So I have a chart inside a panel. The panel contains two tabs. The first tab contains the chart. The second tab contains a small form that I am using to filter the data in the chart.
My filtering form is pretty simple: it contains different time periods such as '7 days', '30 days', etc, and once selected, it sends the user selection (using ajax) to where I am generating the data for my chart.
That's great and all... but how do I get the chart to UPDATE?! The user can select whatever option they want (and I know that the script is getting the data and changing the query), but the chart never changes. I think I'm supposed to use redraw or refresh.
Here's what I'm thinking: Add the redraw/refresh to my form handler here, looking something like this
xtype: 'radiofield',
name: 'timespan',
id: 'radio3',
inputValue: 30,
boxLabel: '30 days',
handler: function(checkbox, checked) {
if (checked ) {
console.log(checkbox.inputValue);
**HERE**
}
}
Question: How can I update an EXTJS chart on a user action?