营销部门已经传递了所需的图表外观和感觉,而无需询问 Dataviz 的功能。我是剑道子弹图类型“verticalBullet”。有没有办法将目标线更改为虚线?
我尝试设置 dashType = "dot"
这是我正在尝试的脚本,但不起作用:
$barChart = $("#bar-chart").empty();
$barChart.kendoChart({
theme: global.app.chartsTheme,
renderAs: "svg",
legend: {
position: "bottom"
},
seriesDefaults: {
type: "column"
},
series: [
{
type: "verticalBullet",
currentField: "score",
targetField: "average",
target: {
color: "#444",
dashType: "dot",
line: {
width: 1,
}
}
data: [
{
score: 93.7,
average: 65.2,
}, {
score: 80.2,
average: 22.2,
}, {
score: 60.8,
average: 35.2,
}, {
score: 82.1,
average: 45.2,
}, {
score: 74.2,
average: 55.2,
}
]
}
],
categoryAxis: {
labels: { rotation: -45 },
categories: ["Sales & Contracting", "Implementation & Training", "Functionality & Upgrades", "Service & Support", "General"],
line: {
visible: false
},
color: "#444",
axisCrossingValue: [0, 0, 100, 100]
},
tooltip: {
visible: false
}
}).data("kendoChart");
任何帮助将不胜感激。
最佳答案
您可以使用目标的边框:
target: {
color: "transparent",
border: {
width: 2,
dashType: "dot",
color: "#444"
},
line: {
width: 0
}
}
这是一个现场演示:http://jsbin.com/AreqameT/1/edit
关于javascript - 使用Kendo Bullet Graph如何将目标线更改为虚线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20907769/