Cartesian Chart - how to select an item with the 0 value?

2 posts, 0 answers
  1. Rostislaw
    Rostislaw avatar
    6 posts
    Member since:
    Nov 2015

    Posted 28 Jan 2016 Link to this post

    Hi *,

    I try to use the selection changed Event for the cartesian Chart to notify another view.

    It works fine but I recognized that there is no possibility to select an item with the null value (see attached Picture).


    Any ideas?



  2. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 29 Jan 2016 Link to this post

    Hi Rostislaw,

    One way to go here is to have a zero-bar indication. This is when the value of the bar is zero, the bar to have a specific look, for example, it can be 2 pixels tall, have a yellow background and be slightly transparent. This way, the user will be able to see and click the bar. This you can do via the DefaultVisualStyleSelector.

    Another option is to allow the users to click on the bar labels. This way a user will not be able to click the bar itself, but will be able to click the corresponding label. You can get this dove via the label definitions of the series, its Template property and an attached property that will actually toggle the selection.

    I have attached a small project demonstrating both of these approaches. If you have a question about how to do something else you have in mind, feel free to ask us again.

    Petar Marchev
    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
Back to Top