admin管理员组文章数量:1202341
The following is the code that i have used to add patterns in lengends of the billboard graph .
var chart = bb.generate({
data: {
columns: [
["data1", 30, 200, 100, 400, 150, 250],
["data2", 130, 100, 200, 100, 250, 150],
["data3", 60, 190, 320, 520, 20, 300],
["data4", 80, 20, 250, 320, 180, 50]
],
type: "line", // for ESM specify as: line()
},
point: {
pattern: [
"circle",
"rectangle",
"<polygon points='4 0 0 8 8 8'></polygon>",
"<polygon points='4 0 0 4 4 8 8 4 4 0'></polygon>"
]
},
legend: {
usePoint: true
},
bindto: "#usePoint"
});
I tried adding usepoint: true
in the tooltip block of the graph and was expececting that the same patterns will be used in the tooltip.
tooltip: {
format: {
title: function(d) {
return 'Data ' + d;
},
usePoint: true,
value: function(value, ratio, id) {
var format = id === "data1" ? d3.format(',') : d3.format('$');
return format(value);
}
}
}
usepoint is not getting accepted for tooltip and i am getting the following error
Object literal may only specify known properties, and 'usepoint' does not exist in type 'TooltipOptions'.ts(2353)
My expection is to add the same patterns in the tooltip , which i have used in the graph and legend .
image with patterns
本文标签:
版权声明:本文标题:javascript - The plugin has given an option to add patterns in the legend i want to know how to add them in tooltip - Stack Over 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738571465a2100621.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论