我正在使用canvas.js
,它工作正常。我只是想改变tooltip
的颜色。我试试以下代码CanvasJS从数据颜色更改工具提示颜色
toolTip: {
enabled: true,
animationEnabled: true,
fontColor: "red",
Content: "{x} : {y}",
},
通过它不改变整个工具提示颜色。 我该怎么做。
这里是我的JS
var chartResponses = new CanvasJS.Chart("chartResponses", {
animationEnabled: true,
toolTip: {
enabled: true,
animationEnabled: true,
fontColor: "red",
Content: "{x} : {y}",
color: "rgba(0, 0, 0, 0.25)",
},
axisX: {
titleFontFamily: "verdana",
valueFormatString: "D/M/YYYY",
tickThickness: 0,
lineThickness: 1,
gridThickness: 0,
gridColor: "#f2f6f7",
lineColor: "#f2f6f7",
labelFontColor: "#8fa2aa",
labelFontSize: 12
},
axisY: {
titleFontFamily: "verdana",
valueFormatString: "0",
tickThickness: 0,
lineThickness: 0,
gridThickness: 1,
gridColor: "#f2f6f7",
lineColor: "#f2f6f7",
labelFontColor: "#8fa2aa",
labelFontSize: 12
},
data: [{
type: "splineArea",
showInLegend: true,
markerSize: 0,
name: "",
color: "rgba(29, 176, 237, 0.25)",
dataPoints: allResponses
}],
});
chartResponses.render();
我想改变工具提示的颜色不是背景颜色。 – urfusion
您可以分享您的任何形象的要求,以便我们可以查看它并提供解决方案 – Sanjoy
我希望您可以检查图像工具提示'7/7/2016:20'中的日期与颜色不同图形数据字段。像'20'现在有不同的颜色。 – urfusion