2015-05-18 11 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();