Chart first item doesnt start from the start

1 Answer 75 Views
Charts General Discussions Styling
n/a
Top achievements
Rank 1
n/a asked on 23 Aug 2022, 11:21 AM

as you can see the first item (and the last one), does not start from the most right/left, how can I get rid of that space?

 

 


 

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 25 Aug 2022, 11:31 AM

Hi, hagi,

The faced behavior is caused by the `line` series rendered above the `area` one. The labels in the line series are rendered in the middle of the item in order to keep the end markers of the series visible, hence the area series is also rendered in this way when both series type are combined.

In case using an additional line series is not mandatory for your scenario, you can set the `line` prop of the area series and remove the line series:

Regards,
Vessy
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


n/a
Top achievements
Rank 1
commented on 29 Aug 2022, 05:46 AM

thanks a lot! but is there a way to do the line +area with chart legend? every time I try what you suggested the chartlegend disappear 
Vessy
Telerik team
commented on 29 Aug 2022, 03:26 PM

Hi, hagi,

Yes, you can keep the legend if you are rendering only one area series, but the legend item will be only 1 in this case (as the line is rendered as a border, not a separate series):

https://stackblitz.com/edit/react-tcojzt-kb5rfp?file=app%2Fmain.jsx

Tags
Charts General Discussions Styling
Asked by
n/a
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or