javascript - Change display according to an option selected on top of a columnJQchart -
I need three radio button fields to display monthly, monthly, weekly data on the column chart, so that when I have the option The performance should be accordingly. I found a lot of examples in the Jackchert for different types of displays, but no examples could be found for this. Is there any other alternative to radio buttons? Please help
For your best bet you need to have three series of data once for each Easily swap the series using the listener on the radio button.
Originally:
& lt; Input type = "radio" name = "data" id = "annual" class = "radio selector" value = "yearly" & gt; Yearly; & Lt; Br> & Lt; Input type = "radio" name = "data" id = "monthly" category = "radio selector" value = "monthly" & gt; Monthly & lt; Br> & Lt; Input type = "radio" name = "data" id = "daily" class = "radio selector" value = "daily" & gt; Daily & lt; Script & gt; $ ('. Radiosity'). Click (function (event) {// Set target id var id = $ (event.target) .attr ('id'); // current series var series = $ ('# jqChart' ',' series' Update in chart (redro), 'series', 'series', 'radio', 'radio': series = daily data; break;} // $ ('# jqchart'). JqChart ('update');} ); & Lt; / script & gt;
Comments
Post a Comment