Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8521737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:54:40+00:00 2026-06-11T06:54:40+00:00

So I have a chart inside a panel. The panel contains two tabs. The

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:54:42+00:00Added an answer on June 11, 2026 at 6:54 am

    I figured it out! Here’s what I did:

    Here is a handler (from above) for one of my radio buttons. If the button is checked, then I reload the store of my chart. Instead of passing hardcoded data, I made a function titled filteredData. This function uses ajax to generate the data for that chart in a particular format. I send the checked value (variable name ‘value) as a param in order to be used by the function.

    handler: function(checkbox, checked) {
        if (checked ) { //refreshes the chart with new data
            var chart = this.ownerCt.ownerCt.ownerCt.getComponent('dataTab').getComponent('graph');
            var chartCmp = chart.getComponent('chartCmp'); //actual chart (used to redraw)
            var value = checkbox.inputValue; //checked value
    
    
            chart.store.loadData(filteredData(value));
            chartCmp.redraw();
        }}
    

    Once the store is refreshed, I then redraw the chart!

    store.load was a very important part that I didn’t realize I needed.

    Simple enough 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a chart (code to replicate will be below) that has two lines
I have created a chart using JFreeChart inside a JSP. I want to render
I have a chart that I would like to update whenever a form on
I have a panel placed inside a webpart which holds a chart . The
I have a Highchart scatter chart that plots data calculated using a PHP script.
I have a class that is using a stackpanel which then gets called inside
I have chart inside a report in Microsoft Access 2010 that gets its RecordSource
I have chart.png with data in it that I would like to put a
I have a chart generated from Google Charts that can be found here: Chart
I have a chart on a Windows Form with several line graphs. I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.