Display a line for 0 value data

6 posts, 1 answers
  1. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 30 Jul 2012 Link to this post

    I am trying to build a real time data visualizer using telerik radchart. However, more often than not the first few minutes or so the data source does not have any data (thus the data points on the chart are 0s). I want the users to be able to see the 0 values as a line instead of just an empty graph with moving X axis. Any pointers on how I can achieve this?

    Much appreciated.
  2. Answer
    Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 02 Aug 2012 Link to this post

    Hi Jinyan Cao,

    By default the chart would draw a line even if there are only zero values, however, in most cases it would not be clearly visible because of the PlotAreaAxis. Here are a few suggestions that you may find appropriate for your scenario :

    1. In case you are using AutoRange = True, you could set a custom axis range, for example, from -1 to 1 with a Step = 1 and then set the AxisY PlotAreaAxisVisibility to Collapsed.
    2. If you have a defined manual axis range, then simply collapsing the PlotAreaAxis would work as well.
    3. Another possible solution would be to increase the thickness of the Line series when there are only zero values in the chart.

    All of these suggestions could be applied dynamically - while there are only zero values present in the chart. This way when there are other positive/negative values, the chart would work normally.

    Hope this helps.

    Greetings,
    Nikolay
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 02 Aug 2012 Link to this post

    Thanks! I am not using custom range for Y axis and it's working like a charm.
  5. danny
    danny avatar
    7 posts
    Member since:
    May 2012

    Posted 22 Aug 2012 Link to this post

    How can I do this if I'm using the MVC controls?
  6. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 23 Aug 2012 Link to this post

    Hello Danny,

     Please ask your questions in the forum threads that are created with same Product and Technology as the one yo use. This thread relates to RadChart for WPF only.

    Kind regards,
    Evgenia
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  7. danny
    danny avatar
    7 posts
    Member since:
    May 2012

    Posted 23 Aug 2012 Link to this post

    Ok sorry.  I have asked the question there and has gone unanswered for almost a month.
Back to Top
UI for WPF is Visual Studio 2017 Ready