2015-05-18 17 views
1

是否可以在以下canvasjs的組合圖表中僅禁用一個系列工具提示?在CanvasJS組合圖表中禁用工具提示

data: [ 
    { 
     type: "area", 
     color: "red",  // change color here 
     fillOpacity: 1, 
     dataPoints: [ 
    { x: 0, y: 100 }, 
    { x: 100, y: 100 } 
    ] 
    }, 
    { 
     type: "area", 
     color: "yellow", 
     toolTipContent: " ", 
     dataPoints: [ 
    { x: 0, y: 10 }, 
    { x: 100, y: 100 } 
    ] 
    } 
] 

這裏是鏈接到我的小提琴: https://jsfiddle.net/Abhishek1191/s71djz9m/2

我有四個獨立的系列小提琴內部繪製。 3區和1條線。如果有人可以告訴我是否可以禁用區域系列的工具提示。

在此先感謝

回答

1

相反toolTipContent設置爲空字符串,設置toolTipContent爲null,這將禁用單個數據點/ dataSeries的提示。在你的jsfiddle中,你正在使用v1.4.1,它不支持這個功能。請下載最新版本。這裏是working code

var chart = new CanvasJS.Chart("container", 
{ 
    data: [ 
    { 
     toolTipContent: null, 
     type: "column", 
     dataPoints:[ 
      { x: 10, y: 20} 
     ] 
    } 
    ] 
}); 
chart.render();