Chart Labels inside column

3 posts, 1 answers
  1. Phil
    Phil avatar
    10 posts
    Member since:
    Jun 2019

    Posted 06 Sep Link to this post

    I have an issue on my Telerik charts where the data label will be inside of the column if the column reaches the edge of the chart area, as attached.

    Is there anyway to force the chart to not reach the edge so this won't occur? I'm assuming it takes the largest value and uses that as the edge of the chart, how do I go about stopping this? I've made sure the DataPointLabelAlignment is set to OutsideEnd, as that would make the most logical sense.

    Any help on this would be greatly appreciated - I'm sure it's something small and stupid that I'm missing!

     

    Thanks,

     

  2. Answer
    Silviya
    Admin
    Silviya avatar
    414 posts

    Posted 10 Sep Link to this post

    Hi Phil,

    The graph axis range is determined by data, not by the visual representation of the data points. That's why the X axis maximum value is set to the maximum value according to the data instead of adding some more to accommodate the label.

    The answer is to use the CoordinateSystem.Bindings - this way the axis minimum and maximum can be set using an expression and depending on the maximum provided value. For example, the PropertyPath should be set to XAxis.Scale.Maximum, and the Expression - to =Max(Fields.Value)+1, where Fields.Value represents the measure displayed on the X axis.
    You can check the following article for more details: How to: Use Bindings to Control the Coordinate System Properties.

    Best Regards,
    Silviya
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Phil
    Phil avatar
    10 posts
    Member since:
    Jun 2019

    Posted 16 Sep in reply to Silviya Link to this post

    Hi Silviya,

    That works a treat. I've been able to tweak the XAxis maximum scale to meet my needs and cause no overlapping of data point labels - issue resolved!

    Thanks

Back to Top