Hi, I just want to set the series dynamicly, and I find below code in API, then I copy this to my sample code, but the set function didn't work. I have imported below js and css:
<!-- Ignite UI Required Combined CSS Files --> <link href="../../igniteui/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" /> <link href="../../igniteui/css/structure/infragistics.css" rel="stylesheet" /> <!--CSS file specific for chart styling --> <link href="../../igniteui/css/structure/modules/infragistics.ui.chart.new.css" rel="stylesheet" />
<script src="../../js/modernizr.min.js"></script> <script src="../../js/jquery.min.js"></script> <script src="../../js/jquery-ui.min.js"></script>
<!-- Ignite UI Required Combined JavaScript Files --> <script src="../../igniteui/js/infragistics.core.js"></script> <script src="../../igniteui/js/infragistics.dv.js"></script>
<script type="text/javascript"> $(function () {
// Initialization var data = [{ "Label": "1/1/2012", "Item1": 980, "Item2": 1000 }, { "Label": "1/2/2012", "Item1": 1200, "Item2": 1500 }];
$("#chart").igDataChart({ axes: [{ name: "xAxis", type: "categoryX", dataSource: data, label: "Label" }, { name: "yAxis", type: "numericY" }], series: [{ name: "series1", dataSource: data, title: "Price Series 1", type: "column", xAxis: "xAxis", yAxis: "yAxis", valueMemberPath: "Item1" }] });
// Get var series = $("#chart").igDataChart("option", "series"); series[0];
// Set $("#chart").igDataChart("series", [{ name: "series2", dataSource: data, title: "Price Series 2", type: "column", xAxis: "xAxis", yAxis: "yAxis", valueMemberPath: "Item1" }] );
</script>
Hello Charlie,
Thank you for contacting Infragistics!
I am looking into the details of the case. I will get back to you by tomorrow. If you have any questions, please let me know as well.