jQWidgets Forums
jQuery UI Widgets › Forums › Chart › Issue in chart series hide functionality
This topic contains 17 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 4 months ago.
-
Author
-
Hi,
I am building chart with ‘stackedcolumn’ type series. On any legend box click corresponding block is hidden in series and that is working fine.
And if I redraw chart with new settings on same element the legend is not resetting. The unchecked legend index is persisting after chart redraw also.
Please suggest me the solution for this.
Thanks,
MallikarjunHi Mallikarjun,
I don’t think that this is an issue. “Redraw” shouldn’t affect the choice of an issue to hide/show a specific Serie. If you want to manually show/hide series, then you may use the showSerie and hideSerie methods. Example: http://jsfiddle.net/6nr27es5/
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Thanks for reply. Can you please tell me how can I get the hidden series details. So that I can call ‘showSerie’ on that.
Thanks,
MallikarjunHi mallikarjunb,
The sample I sent you showcases how to show/hide a given serie by its index. For more information about these methods, look at the Chart’s API Documentation.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Sorry, I didn’t find any method in API which will provide hidden series indexes for me. It would be greatly helpful for me if you provide such method details.
Thanks,
MallikarjunHi Mallikarjun,
I never told you that there is such API. There’s API for showing and hiding series and I sent you a sample which uses it. You should probably know how much series you have in your Chart when you created it. Serie’s 1 index is 0, Serie’s 2 index is 1 and so on.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
How can I listen the click event on a legend?
Thanks,
MallikarjunHi Mallikarjun,
Such event is not available.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/I observed an issue in the demo example given at following URL.
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/index.htm#demos/jqxchart/javascript_chart_stacked_series.htmIf I hide ‘Running’ and ‘Swimming’ Y-axis line is getting disappeared. This is due to by default second series valueAxis is hidden.
This issue need to be solved in my project. Please suggest a way to solve this problem.Thanks,
MallikarjunHi Mallikarjun,
This is not an issue. If you hide a serie, its valueAxis will be hidden, too, because it would not be necessary for it to be displayed.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
But by hiding one series data complete Y-Axis getting disappeared even though there is one more series data.
Due to this chart is drawn without Y-Axis but with data.Please suggest any way to dynamically update ‘valueAxis’ visibility property based on checked/unchecked series items.
Regards,
MallikarjunHi Mallikarjun,
I suggest you to look at the Chart’s API reference which has examples that demonstrate how to set a Chart property dynamically and refresh the Chart.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Unfortunately I didn’t find any mechanism to solve my problem. It would be better if you suggest any solution for requirement mentioned in REPLY#65241.
Thanks,
MallikarjunHi Mallikarjun,
Ok, easiest solution is – don’t hide your valueAxis so you would not have to update hidden valueAxis visibility.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/In that case two Y-Axis will be shown. I need only one Y-Axis for all series.
Regards,
Mallikarjun -
AuthorPosts
You must be logged in to reply to this topic.