Reputation: 1
I am using Kendo UI Chart, I want to draw a chart with multiple colors.
I am using code like:
@(Html.Kendo().Chart()
.Name("chart")
.Title("D I S C")
.Legend(legend => legend
.Visible(false)
)
.Series(series =>
{
series.Column(new int[] { 94,66,12,12 }).Color("#ff0000");
})
.CategoryAxis(axis => axis
.Name("series-axis")
.Categories("94","66","12","12")
//.Categories
.Line(line => line.Visible(false))
)
)
but its showing one color for each bar. i want to show different color in every bar. Please help me to create chart with multiple color.
Upvotes: 0
Views: 305
Reputation: 1559
I'm not familiar with kendo ui chart api, but it seem like you may need to specify more series of data, like this:
.Series(series =>
{
series.Column(new int[] { 94 }).Color("#ff0000");
series.Column(new int[] { 66 }).Color("#ffff00");
series.Column(new int[] { 12 }).Color("#00ff00");
})
Upvotes: 0