Hi,
I have a view with a chart and a DropDown control; the first time, the controller send a model with a ChartItem data list to the chart;
every time I change the selected value from the dropdown control, I want to use the controller to query some new data for the viewmodel.
now, I struggle to update the chart.
I tried to use the $(‘#chart’).jqxChart(‘refresh’); but nothing changes.
The only way I found is kind of heavy
I had to create a new source in the Javascript to make it work.
` var source = {
datatype: “json”,
datafields: [
{ name: ‘Day’ },
{ name: ‘SmsCount’ }
],
async: false,
record: ‘Array’,
url: ‘@Url.Action(“GetSmsInfoStats”, “Sms”)’+”?monthOffset=”+value
};`
it’s working but it’s kind of stupid because the viewmodel contains already the new data and been forced to query the data in another function is sort kind of duplicate way-
Can you help me to simplify the concept ?
thanks in advance
-vince