Axis labels not positioned at bottom when graph have negative values

Nicklas

As a part of a report I have a chart that displays both negative and positive values (see attachment), which seems to work fine :) However, I need to place the axis labels at the bottom, and not in the center (0) as they are right now. I came across an older post saying that this was not possible at that time (around mid to late 2012), but I was hoping this was sorted by now?

Here's my chart code:

@(Html.Kendo().Chart()

.Name("chart")

.Theme("silver")

.Legend(legend => legend.Visible(false))

.ChartArea(chartArea => chartArea

.Background("transparent")

)

.Series(series =>

{

series.Area(@Model.Weight).Name("Weight");

})

.ValueAxis(axis => axis

.Numeric("depth")

.Labels(labels => labels.Format("{0}kN"))

.AxisCrossingValue(0)

.Line(line => line.Visible(false))

)

.CategoryAxis(axis => axis

.AxisCrossingValue(0,0,0,10)

.Categories(@Model.Depth)

.MajorGridLines(lines => lines.Visible(true))

)

.Tooltip(tooltip => tooltip

.Visible(true)

.Format("{0}%")

.Template("#= series.name #: #= value #")

)

)

If this is still not supported, I'd greatly appreciate a possible workaround as this is much needed functionality :)
Thanks in advance!

Nicklas

Thanks for your quick feedback. Your suggested solution works with that particular example, but as soon as the values generated in the graph are all negative the padding is way off :/ See attached image

Iliana Nikolova

I am sorry to hear the suggested solution does not fit your requirements, however I am afraid currently there is no a better workaround. What I can suggest you is adjusting the categoryAxis.labels.padding in Chart dataBound event via the chart.options:

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.