StackedArea chart ignores X values

Thread is closed for posting
4 posts, 0 answers
  1. Karim
    Karim avatar
    18 posts
    Member since:
    Feb 2009

    Posted 19 May 2009 Link to this post

    I have a chart with X values ranging from -160 to 0. The type of the chart is StackedArea. However, when the chart is rendered, the values on the X axis range from 1 to 26. Why is this chart type ignoring the X values I'm giving it? Same is true for the StackedSplineArea chart.

    Without changing anything else, if I change the chart type to Line or StackedBar, the X values correctly range from -160 to 0. It seems like this is a bug in the StackedArea type charts. Is there a workaround or fix available for this?

    Thanks.
  2. Dessy
    Admin
    Dessy avatar
    73 posts

    Posted 20 May 2009 Link to this post

    Hi Karim,

    Indeed, stacked series do not take into account XValue. The reason is that there is no way to determine the chart graph if there are series which do not have items for each value of X axis. So, RadChart will display next series item at the next X axis item. You can still achieve results as those with line series by making sure that there is an axis item for each series item

    Kind regards,
    Dessy
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Karim
    Karim avatar
    18 posts
    Member since:
    Feb 2009

    Posted 20 May 2009 Link to this post

    Why would the StackedArea be any different than the other charts? Line charts and StackedBar charts don't ignore the X values, so why does the StackedArea? If all series are defined at each X value, the StackedArea should honor the provided X values.

    Maybe I'm missing something, but this seems like an issue with the StackedArea charts. Please clarify if you feel differently.
  4. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 22 May 2009 Link to this post

    Hello Karim,

    Allowing to specify custom X values for stacked area and line series may result in some really bizzare results that cannot be visualized. In order to prevent this we consciously defaulted to ignoring X Values for those types of series to ensure regular intervals between items.

    If you wish to change the X-Axis range you may change your axis labels in the BeforeLayout event.

    Kind regards,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top