RadChartView with Bars and Line series

1 Answer 69 Views
ChartView
Álvaro
Top achievements
Rank 1
Iron
Iron
Álvaro asked on 30 Nov 2023, 10:24 AM | edited on 01 Dec 2023, 08:09 AM

Hi!

I have a chart with multiple Y axes, series, and an X axis as DateTimeContinuousAxis.

The thing is my chart is customizable and I should be able to change the series styling from line to column. When I change one of my series to a column, it is not centered with the rest of the series and according to the X-axis (see first img).

See the tooltips that the lines are at the same point (img2) but when I change to column, the column ends at that point, it is not centered.

Any suggestion?

Columns

Linear

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 05 Dec 2023, 08:55 AM

Hello Álvaro,

Thank you for the provided image.

The behavior demonstrated in the images is expected. The BarSeries is designed to work with a categorical axis. Each bar rectangle element is plotted on the categorical axis by calculating the width between two points. Now the DateTimeContinuousAxis is a continuous axis that plots chronologically sorted DateTime values. While the BarSeries is shown on the chart in this case, the bar elements won't be placed in the same way as in the case of the categorical axis. 

What I can suggest here is to add additional DateTimeCategorical Axis for example, which will be set to the BarSeries. This way it will be easier for the end user to see the value of the bars:

If having two axes is not an option, you can still set the axis to the BarSeries and set its IsVisible property to false.

If none of the approaches works for you, you will need to create a custom rendering behavior and manually position the bar in this case at the desired location. The Custom rendering article describes how you can create your own rendering engine and an example.

I hope that one of these approaches will work for you.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ChartView
Asked by
Álvaro
Top achievements
Rank 1
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or