Duplicate Y-Axis on chart

3 posts, 1 answers
  1. Steven
    Steven avatar
    37 posts
    Member since:
    Jul 2012

    Posted 14 Apr 2015 Link to this post

    Hi,

    We have had a request from a user who asked if we can show the Y-Axis on both sides of a chart. Is there an easy way to do this using your charts for WPF? The only approach to achieving this that I can see is to have two of each series but assign them to different axes. I would prefer not to do it this way if we can avoid it.

    Thanks,

    Steven

  2. Answer
    Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 16 Apr 2015 Link to this post

    Hello Steven,

    We have two charting solutions - the old RadChart and the new RadChartView. The new chartview is actually a set of controls - RadCartesianChart, RadPieChart, RadPolarChart and ChartDataSource. We strongly suggest you do not start new development with the old RadChart, but use only the new one.

    I am a little unsure which of the two you use, so I will provide answer for the two. If you need further assistance, please confirm which control you are using.

    RadChart
    The old chart has an additional-axes feature, which allows you to add an arbitrary number of additional axes. This is explained in our online help article here.

    ChartView
    The chartview has a multiple-axes feature (qsf examples here, online documentation here). This is a bit different. While the chart can work with more than one axis, each axis (except the main axis) needs to be associated with at least one series, in order to be added to the chart. For example, if you have only one series - you can have only one axis. If you have two series, you can have no more than two axes.

    In cases, where you need to show two axes and a single series, we suggest you add a dummy series, which has no data. This dummy series will not be displayed, but you can use it in order to attach a new axis. You can then bind the min, max, step properties of this axis to the properties of the main axis.

    I have attached a simple example that demonstrates both approaches.

    Regards,
    Petar Marchev
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

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

    Posted 17 Apr 2015 in reply to Petar Marchev Link to this post

    Hi,

    Sorry I am using ChartView, I stopped scrolling when I got to Cloud Platform and only saw the one Chart forum (for some reason ChartView is sorted after Cloud Platform, I assumed the list was sorted alphabetically?).

     Thanks for your help, the Dummy series approach and binding min/max/step of the main axis will work.

     

    Thanks for your help.

    Steven

     

     

Back to Top