How to hide FlexChart series

Posted by: ed on 17 June 2019, 7:43 am EST

    • Post Options:
    • Link

    Posted 17 June 2019, 7:43 am EST

    I am working in an MVC Core 2.2 application and have added following chart;

    var viewData = new wijmo.collections.CollectionView(data);

    var receiptsChart = new wijmo.chart.FlexChart(‘#receiptsChart’,

    {

    itemsSource: viewData,

    bindingX: ‘day’,

    series: [

    { binding: ‘amtDueByDay’, name: ‘Due by day’ },

    { binding: ‘amtExpectedByDay’, name: ‘Expected by day’ }

    ],

    palette: wijmo.chart.Palettes[‘cocoa’]

    });

    receiptsChart.series[1].SeriesVisibility.Hidden;

    Initially I want to hide series 1 using the code above which is not working and have not been able to find a solution. Please advise.

    Thanks, Ed

  • Posted 17 June 2019, 8:11 pm EST

    Hello,

    In order to hide a series, you will need to set the visibility property of the series to an enumeration value of SeriesVisibility. So, your code snippet should be:

    receiptsChart.series[1].visibility = wijmo.chart.SeriesVisibility.Hidden;
    

    You may also refer to the sample below:

    https://jsfiddle.net/hpkb9zs0/

    API Reference:

    SeriesVisibility: https://www.grapecity.com/wijmo/api/enums/wijmo_chart.seriesvisibility.html

    Regards,

    Manish Gupta

  • Posted 18 June 2019, 4:32 am EST

    Thanks Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels