Welcome Guest Search | Active Topics |

Show hide series using jQuery after chart is rendered using MVC
fighterjockey
#1 Posted : Wednesday, December 09, 2015 2:10:14 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/9/2015(UTC)
Posts: 1

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I am plotting a line chart which has 3 data series.

I wish to be able to show or hide these series on click of 3 buttons using jquery.

The chart is being rendered using MVC Razor syntax.

I assume there would be some functionality like

$("#chart").series[0].visible = false

but cant seem to find it in documentation.

Please suggest.
Dragan
#2 Posted : Monday, December 14, 2015 7:45:19 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

you can use:
Code:
var series = $('#jqChart').jqChart('option', 'series');

series[0].visible = !series[0].visible;
$('#jqChart').jqChart('update');
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.359 seconds.