将 pointWidth 映射到柱形图中的单个数据点
map pointWidth to a single Datapoint in Column Chart
我知道我可以将 pointWidth ("Bar-width") 设置为 Anychart 中的整个系列。
series1.pointWidth(20);
但是我如何才能将宽度映射到系列中的单个 Bar?
Example Chart
我也知道我已经可以映射颜色等其他属性,但不能映射 pointWidth:
// create a data set
var data = anychart.data.set([
["John", 10000, 12500],
["Jake", 12000, 15000],
["Peter", 13000, 16500, "#5cd65c", "#009933", null, {enabled: true}],
["James", 10000, 13000],
["Mary", 9000, 11000]
]);
// map the data
var seriesData_1 = data.mapAs({x: 0, value: 1, fill: 3, stroke: 5, label: 6});
如果你想根据它的值设置点宽,大概BarMekko chart就可以满足你的要求。
但是,如果您只想为柱形图中的单个条精确设置点宽,请在您的下一条评论中告诉我。
我知道我可以将 pointWidth ("Bar-width") 设置为 Anychart 中的整个系列。
series1.pointWidth(20);
但是我如何才能将宽度映射到系列中的单个 Bar?
Example Chart
我也知道我已经可以映射颜色等其他属性,但不能映射 pointWidth:
// create a data set
var data = anychart.data.set([
["John", 10000, 12500],
["Jake", 12000, 15000],
["Peter", 13000, 16500, "#5cd65c", "#009933", null, {enabled: true}],
["James", 10000, 13000],
["Mary", 9000, 11000]
]);
// map the data
var seriesData_1 = data.mapAs({x: 0, value: 1, fill: 3, stroke: 5, label: 6});
如果你想根据它的值设置点宽,大概BarMekko chart就可以满足你的要求。 但是,如果您只想为柱形图中的单个条精确设置点宽,请在您的下一条评论中告诉我。