FlexChart toggle series

Posted by: josh.nguyen on 15 March 2018, 3:29 pm EST

  • Posted 15 March 2018, 3:29 pm EST

    Hello,

    I’m following this http://demos.componentone.com/ASPNET/ASPNetMVCFlexChart101

    to toggle series but it did not work. Looks like this line of code did not work

    el.checked = chartLegendToggle.series[index].visibility === wijmo.chart.SeriesVisibility.Visible;

    I wonder what chartLegendToggle.series[index].visibility and wijmo.chart.SeriesVisibility.Visible are. Where are they from? Am I missing some js or api?

    Thank you,

  • Posted 18 March 2018, 5:19 pm EST

    Hi Josh,

    We are sorry, we are unable to replicate the issue at our end using referred demo sample for Toggle Series section. On clicking legend, the target series gets hidden from FlexChart and legend opacity gets reduced.

    wijmo.chart.SeriesVisibility is ENUM to set visibility for FlexChart series. Here is the documentation for that:

    http://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.chart.SeriesVisibility.Enum.html

    chartLegendToggle.series[index].visibility is for setting series visibilty.

    chartLegendToggle is FlexChart object reference for ClientSide which may be get using ```

    wijmo.Control.getControl(“hostElement”);

    
    ~Manish
  • Posted 19 March 2018, 1:31 am EST

    Hi,

    I wonder the syntax wijmo.Control.getControl(“hostElement”) come from which library. It looks like I’m missing some kind of library. Do I have to add in any .dll or .js file to make it recognize the command above?

    Thanks

  • Posted 19 March 2018, 3:06 pm EST

    Hi Josh,

    The wijmo.Control.getControl(hostElement) is client side methods used to interact with MVC Control at client.

    The control reference can be get using following code:

    @Html().C1().FlexGrid().Id("grid")
    
    <script>
    onload=function(){
    	var grid= wijmo.Control.getControl("#grid");
    }
    </script>
    

    In the same way, chart reference can be get at client.

    Here is the client side documentation API:

    http://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/

    ~Manish

Need extra support?

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

Learn More

Forum Channels