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 8021535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:00:59+00:00 2026-06-04T22:00:59+00:00

Using Sencha GXT 3.0 is it possible to generate a line chart and populate

  • 0

Using Sencha GXT 3.0 is it possible to generate a line chart and populate it with a dynamic number of line series fields, and if so, what is the recommended method?

I know multiple series fields can be added to a chart, but the line chart examples (and the other chart examples for that matter) make use of an interface which extends PropertyAccess<?> and the interface specifies a static number of expected fields (e.g. data1(), data2(), data3(), etc.). If the interface is to be used to specify the fields to add to the chart, how could you account for a chart which may require n number of fields (i.e. n number of line series on a given chart).

Example provided on Sencha’s site:

http://www.sencha.com/examples/#ExamplePlace:linechart

  • 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-04T22:01:00+00:00Added an answer on June 4, 2026 at 10:01 pm

    I ran into the same issue. It would be a much nicer design if each series had a store instead of having one store per chart.

    I had one long list of metric values in metricDataStore. Each metric value has a description. I wanted all the metric values with the same description displayed on one (and only one) series. I had my value providers for each series return null for both the x and y axis if the value wasn’t supposed to be in the series.

    This seems like a hack to me but it works for my usage:

        myChart = new Chart<MetricData>();
        myChart.setStore(metricDataStore);
    

    .
    .
    .

        for (MetricInfo info : metricInfoData) {
            LineSeries<MetricData> series = new LineSeries<MetricData>();
            series.setChart(myChart);
            series.setSmooth(false);
            series.setShownInLegend(true);
            series.setHighlighting(true);
            series.setYAxisPosition(Chart.Position.LEFT);
            series.setYField(new MetricValueProvider(info.getName()));
            series.setXAxisPosition(Chart.Position.BOTTOM);
            series.setXField(new MetricTimeProvider(info.getName()));
            myChart.addSeries(series);
        }
    

    .
    .
    .

    private class MetricTimeProvider extends Object implements ValueProvider<MetricData, Long> {
        private String metricName;
    
        public MetricTimeProvider(String metricName) {
            this.metricName = metricName;
        }
    
        @Override
        public Long getValue(MetricData m) {
            if (metricName != null && metricName.equals(m.getLongDesc()))
                return m.getId();
            else
                return null;
        }
    
        @Override
        public void setValue(MetricData m, Long value) {
        }
    
        @Override
        public String getPath() {
            return null;
        }
    }
    
    private class MetricValueProvider extends Object implements ValueProvider<MetricData, Double> {
        private String metricName;
    
        public MetricValueProvider(String metricName) {
            this.metricName = metricName;
        }
    
        @Override
        public Double getValue(MetricData m) {
            if (metricName != null && metricName.equals(m.getLongDesc()))
                return m.getMetricValue();
            else
                return null;
        }
    
        @Override
        public void setValue(MetricData m, Double value) {
        }
    
        @Override
        public String getPath() {
            return null;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to HTML5.I see lot of charts using sencha,fusion.Is it possible drawing
I'm using sencha touch and having problems with sorting a Ext.list by number via
I am using Sencha Architect 2. I am trying to generate a generic UI
I am using Sencha V2. I am trying to populate my list with the
I am using sencha touch beta 3 version at the moment. I have a
I'm using Sencha Touch (ExtJS) to get a JSON message from the server. The
I have created navigaton view using Sencha touch 2. Navigation view has list component
I am using http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/portal/portal.html to build a portal. Obviously, i have custom windows inside
I am using sencha to update a panel as follows. I will have a
I am using sencha touch 1.1, and the application has to be portable across

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.