我正在使用dojocharts创建一个条形图,版本是1.9。我在条形图中添加一个指标。我希望添加带有html标签的文本(如break标签)以及指示器上的工具提示。我添加了labelFunc来返回我想要的HTML,但它只显示为纯文本。这里的html标签和工具提示不起作用。任何人都建议我可以在dojocharts指标上添加工具提示和html标签。
以下是我的代码
Chart.addPlot("indicator", { type: "Indicator",
vertical:false,
values:30,
offset: { y: -2, x: -50 },
lineStroke: { color: "green",style: "line" },
labels: true,
htmlLabels: true,
// start:true,
// labelStyle:"inside",
//maxBarSize: 35,
fontColor:"red",
// precision: 1,
labelFunc: max,
stroke: {color:"rgb(204, 204, 204)",height:40,width: 25},
outline: "purple",
fill: "#666"
});
答案 0 :(得分:0)
使用工具提示插件。
有关示例,请参阅本教程https://dojotoolkit.org/documentation/tutorials/1.7/charting/ 该插件名为dojox.charting.action2d.Tooltip,此处描述https://dojotoolkit.org/api/?qs=1.7/dojox/charting/action2d/Tooltip