Hi,
If my chart has only a line series, then the category axis labels align with the line values. But if i add an area series too, then the labels align with the area values instead of the line values.
Is it possible to have both, a line and an area series, but to keep the category axis labels aligned with the line values? (in the images, the grey area has 2 values: 0, 0)
@(Html.Kendo().Chart()
.Name(
"graph"
)
.Title(
""
)
.Legend(legend => legend.Visible(
false
))
.Series(series =>
{
//light grey area
series.Area(Model.Model.GreyAreaValues).Name(
"GreyArea"
).Color(
"#F2F2F2"
).Opacity(1).Line(l =>
{
l.Color(
"#F2F2F2"
);
l.Style(ChartAreaStyle.Step);
l.Width(4);
}).Axis(
"valuesAxis"
).Markers(
false
);
//blue line
series.Line(Model.Model.BlueLineValues).Name(
"BlueLine"
).Color(
"#3399FF"
).Width(4).DashType(ChartDashType.Solid).Markers(
false
).Style(ChartLineStyle.Step);
})
.CategoryAxis(axis => axis.Name(
"categoryAxis"
)
.Categories(Model.Model.CategoryValues)
.MajorGridLines(lines => lines.Visible(
false
))
.Labels(l => l.Format(CateGoryLabel)
.Margin(1)).Justify(
true
)
.Labels(l => l.Font(
"'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans - serif"
))
)
.ValueAxis(axis => axis
.Numeric(
"valuesAxis"
)
.Labels(labels => labels.Format(
"{0:C}"
))
.Labels(l => l.Font(
"'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans - serif"
))
.AxisCrossingValue(-10)
.MinorGridLines(l => l.Visible(
false
))
.MajorGridLines(l => l.Visible(
false
))
)
.Tooltip(tooltip => tooltip
.Visible(
true
)
.Format(
"{0}%"
)
.Template(
"#= kendo.toString(value, \"c\") #"
)
)
Thank you in advance!