Programmatically hide a chart column according to category

3 posts, 0 answers
  1. Ron
    Ron avatar
    122 posts
    Member since:
    Sep 2011

    Posted 03 May 2016 Link to this post

    We look for a way to programmatically hide a certain column from a chart according to its category value and user selection. For example look at the following basic columns chart dojo:

    How can we hide from this chart the column of year 2005 programmatically?

    Notice we look for a way to hide/show it programmatically and dynamically without manipulating the chard data




  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 05 May 2016 Link to this post

    Hi Ron,

    Hiding / showing series points in Kendo UI Chart is not supported. What I would suggest as a workaround is following;
    - Bind the chart to a dataSource and use the series.colorField option to set colors to each of the points; 
    - Remove the series borders;
    - Change a point color to transparent;
    - Redraw the chart.
    For your convenience here is a dojo which demonstrates the suggested approach in action.

    Iliana Nikolova
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Ron
    Ron avatar
    122 posts
    Member since:
    Sep 2011

    Posted 05 May 2016 in reply to Ron Link to this post

    Thanks Iliana Nikolova,
    Unfortunately this results with a missing bar - the chart still presents the space of the hidden bar.
    Since there is no support for this we will have to manipulate the data (which we hoped to avoid)




Back to Top