Hi, I realized the 2 bar chart in a single mvc5/bootstrap page as shown in the image "actual.jpg" (see the code) I would like to obtain the result in "wanted.jpg" in short an overlapping bar chart and changing categories colors, there is a way to do this?
Thank You in advance.
code:
<div class="container-fluid">
<div class="row">
<div class="col-xs-18 col-md-12">
@(Html.Kendo().Chart()
.Name("chart-multi")
.Title("First")
.Legend(legend => legend
.Position(ChartLegendPosition.Top)
)
.Series(series =>
{
series
.Column(new int[] { 20, 40, 45, 30, 50 })
.Color("#cc6e38")
.Spacing(-1)
.Name("on battery");
series
.Column(new int[] { 20, 30, 35, 35, 40 })
.Color("#ef955f")
.Name("on gas");
})
.CategoryAxis(axis => axis
.Categories("Mon", "Tue", "Wed", "Thu", "Fri")
.AxisCrossingValue(0, 10)
)
.ValueAxis(axis => axis
.Numeric()
.Title("miles")
.Min(0).Max(100)
)
.ValueAxis(axis => axis
.Numeric("km")
.Title("km")
.Min(0).Max(161).MajorUnit(32)
)
)
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-18 col-md-12">
@(Html.Kendo().Chart()
.Name("bar-chart")
.Title("Second")
.Series(series =>
{
series.RangeColumn(new double[][] {
new double[] {0, 121.99},
new double[] {38.47, 121.99},
new double[] {16.17, 38.47},
new double[] {0, 16.17}
}).Labels(labels => labels
.Visible(true)
.From(from => from.Template("#=value.from#"))
.To(to => to.Template("#=value.to#")));
})
.CategoryAxis(axis => axis
.Categories("Total", "Done", "Committed", "Uncommitted")
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Template("#= value.to - value.from #")
)
)
</div>
</div>
</div>