| [Client side] function getfiltervalues(sender) { var param = (sender.checked) ? "filterData" : "NormalData"; $.ajax({ url: '@Url.Action("Filter","Home")', type: "Post", data: { 'filter': param }, dataType: "json", success: function (data) { var chart = $("#container").ejChart("instance"); chart.model.series[0].dataSource = data; chart.model.series[0].xName = "XBusinessValue"; chart.model.series[0].yName = "YTechnologyHealth"; chart.model.series[0].size = "CostOfOwnership"; chart.model.series[0].pointColorMappingName = "bubbleColor"; chart.redraw(); }, }); } [Server Side] [HttpPost] public ActionResult Filter(string filter) { List<BubbleChartPopulationData> oBubbleChartPopulationData = (filter.ToString() == "filterData") ? BubbleChartPopulationData.GetDataFiltered() : BubbleChartPopulationData.GetData(); return Json(oBubbleChartPopulationData); } |
Thanks a lot Saravana Kumar for your help. You made my work simple. My requirement is addressed and it looks very good. Thanks again. There is only one issue which i am facing on this, major/minor lines are not visible after the filtering. I tried adding it through javasacript using chart.model.primaryXAxis.range.min /max/interval but didnt work. any other thoughts?
Hi Saravana Kumar,
Sorry for the delay in responding to this. I tried the CatagoryAxis example in the code and it worked as expected. Thanks a lot for the help.
Thanks,
Karthick