SlideShare a Scribd company logo
Wednesday, November 2, 2011
DRAWING AND CHARTING
                              Brendan Coughran, Sencha


                                      @whereisthysting


Wednesday, November 2, 2011
Draw




Wednesday, November 2, 2011
Surface




                         SVG Engine   VML Engine   Canvas Engine




                                        Sprite




Wednesday, November 2, 2011
Surface




                              SVG Engine
                               VML Engine
                              Canvas Engine




                                 Sprite




Wednesday, November 2, 2011
Surface




Wednesday, November 2, 2011
Surface
                              Vector Primitives
                                    Text
                                  Images
                                 Gradients




Wednesday, November 2, 2011
Sprite




Wednesday, November 2, 2011
Sprite
                       Abstracted drawing elements
             Normalizes differences between engine API syntax
                                 Attributes
                                  Events
                                Transforms
                                Animations




Wednesday, November 2, 2011
DrawComponent
       Extends Component
       Contains surface
       Layout participation

       <replace-with class='com.sencha.gxt.chart.client.draw.engine.SVG'>
        <when-type-is class='com.sencha.gxt.chart.client.draw.Surface' />
       </replace-with>
       <replace-with class='com.sencha.gxt.chart.client.draw.engine.VML'>
        <when-type-is class='com.sencha.gxt.chart.client.draw.Surface' />
        <any>
          <when-property-is name='user.agent' value='ie6' />
          <when-property-is name='user.agent' value='ie8' />
        </any>
       </replace-with>




Wednesday, November 2, 2011
DrawComponent Example
              DrawComponent component = new DrawComponent();

              PathSprite path = new PathSprite();
              path.addCommand(new MoveTo(75, 75));
              path.addCommand(new CurveTo(0, -25, 50, 25, 50, 0, true));
              path.addCommand(new CurveTo(0, -25, -50, 25, -50, 0, true));
              path.setStroke(new RGB("#000"));
              path.setStrokeWidth(2);
              path.setFill(new RGB("#fc0"));
              path.setFillOpacity(0.25);

              component.addSprite(path);
              component.redraw();




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Charts




Wednesday, November 2, 2011
Chart Example
              ListStore<Data> store = new ListStore<Data>(dataAccess.nameKey());
              store.addAll(TestData.getData(12, 0, 100));

              Chart<Data> chart = new Chart<Data>();
              chart.setStore(store);
              chart.setChartShadow(true);




Wednesday, November 2, 2011
Scatter Example
              NumericAxis<Data> axis = new NumericAxis<Data>();
              axis.setPosition(Position.LEFT);
              axis.addField(dataAccess.data1());
              axis.addField(dataAccess.data2());
              axis.addField(dataAccess.data3());
              TextSprite title = new TextSprite("Number of Hits");
              title.setFontSize(18);
              axis.setTitleConfig(title);
              chart.addAxis(axis);

              ScatterSeries<Data> series = new ScatterSeries<Data>();
              series.setYAxisPosition(Position.LEFT);
              series.setYField(dataAccess.data1());
              series.setMarkerColor(RGB.GREEN);
              series.setMarkerType(Shape.CROSS);
              series.setMarkerSize(8);
              series.setHighlighting(true);
              chart.addSeries(series);


Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Bar Example
              CategoryAxis<Data, String> catAxis = new CategoryAxis<Data, String>();
              catAxis.setPosition(Position.LEFT);
              catAxis.setField(dataAccess.name());
              title = new TextSprite("Month of the Year");
              title.setFontSize(18);
              catAxis.setTitleConfig(title);
              chart.addAxis(catAxis);

              BarSeries<Data> bar = new BarSeries<Data>();
              bar.setYAxisPosition(Position.BOTTOM);
              bar.addYField(dataAccess.data1());
              bar.addColor(RGB.GREEN);
              bar.setHighlighting(true);
              chart.addSeries(bar);




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Line Example
              Legend<Data> legend = new Legend<Data>();
              legend.setPosition(Position.RIGHT);
              legend.setItemHighlighting(false);
              legend.setItemHiding(true);
              chart.setLegend(legend);

              LineSeries<Data> series = new LineSeries<Data>();
              series.setYAxisPosition(Position.LEFT);
              series.setYField(dataAccess.data1());
              series.setStroke(RGB.RED);
              series.setShowMarkers(true);
              series.setMarkerType(Shape.CROSS);
              series.setMarkerSize(6);
              series.setMarkerColor(RGB.RED);
              series.setHighlighting(true);
              chart.addSeries(series);




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Area Example
              AreaSeries<Data> series = new AreaSeries<Data>();
              series.setYAxisPosition(Position.LEFT);
              series.setOpacity(0.93);
              series.addYField(dataAccess.data1());
              series.addYField(dataAccess.data2());
              series.addYField(dataAccess.data3());
              series.addYField(dataAccess.data4());
              series.addYField(dataAccess.data5());
              series.addYField(dataAccess.data6());
              series.addYField(dataAccess.data7());
              series.addColor(new RGB(148, 174, 10));
              series.addColor(new RGB(17, 95, 166));
              series.addColor(new RGB(166, 17, 32));
              series.addColor(new RGB(255, 136, 9));
              series.addColor(new RGB(255, 209, 62));
              series.addColor(new RGB(166, 17, 135));
              series.addColor(new RGB(36, 173, 154));
              chart.addSeries(series);



Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Gauge Example
              GaugeAxis<Data> axis = new GaugeAxis<Data>();
              axis.setMargin(10);
              axis.setMinimum(0);
              axis.setMaximum(100);
              chart.addAxis(axis);

              GaugeSeries<Data> gauge = new GaugeSeries<Data>();
              gauge.addColor(color);
              gauge.addColor(new RGB("#ddd"));
              gauge.setAngleField(provider);
              gauge.setNeedle(needle);
              gauge.setDonut(donut);
              chart.addSeries(gauge);




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Radar Example
              RadialAxis<Data, String> axis = new RadialAxis<Data, String>();
              axis.setCategoryField(dataAccess.name());
              chart.addAxis(axis);

              RadarSeries<Data> radar = new RadarSeries<Data>();
              radar.setYField(dataAccess.data1());
              radar.setStroke(RGB.RED);
              radar.setShowMarkers(true);
              radar.setMarkerType(Shape.CIRCLE);
              radar.setMarkerColor(RGB.RED);
              chart.addSeries(radar);




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Pie Example
           PieSeries<Data> series = new PieSeries<Data>();
           series.setAngleField(dataAccess.data1());
           chart.addSeries(series);

           Gradient slice1 = new Gradient("slice1", 45);
           slice1.addStop(new Stop(0, new RGB(148, 174, 10)));
           slice1.addStop(new Stop(100, new RGB(107, 126, 7)));
           chart.addGradient(slice1);

           series.addColor(slice1);




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Customization
                                   and
                               Interactivity



Wednesday, November 2, 2011
Events
           series.addSeriesSelectionHandler(new SeriesSelectionHandler() {
             @Override
             public void onSeriesClick(SeriesSelectionEvent event) {
               Info.display("Click",    NumberFormat.getFormat("0").format
       (event.getValue()));
             }
           });




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Mixed Example
             BarSeries<Data> bar = new BarSeries<Data>();
             bar.setYAxisPosition(Position.LEFT);
             bar.addYField(dataAccess.data1());
             bar.setColumn(true);
             bar.addColor(new RGB(240, 165, 10));
             bar.setShownInLegend(false);
             chart.addSeries(bar);

             ScatterSeries<Data> scatter = new ScatterSeries<Data>();
             scatter.setYAxisPosition(Position.LEFT);
             scatter.setYField(dataAccess.data2());
             scatter.setMarkerType(Shape.CIRCLE);
             scatter.setMarkerSize(6);
             scatter.setMarkerColor(RGB.RED);
             scatter.setLegendTitle("Scatter");
             chart.addSeries(scatter);

             LineSeries<Data> line = new LineSeries<Data>();
             line.setYAxisPosition(Position.LEFT);
             line.setYField(dataAccess.data3());
             line.setStroke(RGB.BLUE);
             line.setSmooth(true);
             line.setFill(new RGB(32, 68, 186));
             line.setLegendTitle("Line");
             chart.addSeries(line);
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Renderer Example
           column.setRenderer(new SeriesRenderer<Data>() {
             @Override
             public Sprite spriteRenderer(Sprite sprite, int index, ListStore<Data>
       store) {
                sprite.setFill(colors[index % colors.length]);
                return sprite;
             }
           });
           column.setHighlighter(new SeriesHighlighter() {
             @Override
             public void hightlight(Sprite sprite) {
                sprite.setStroke(new RGB(85, 85, 204));
                DrawFx.createStrokeWidthAnimator(sprite, 3).run(250);
             }
             @Override
             public void unhightlight(Sprite sprite) {
                sprite.setStroke(Color.NONE);
                DrawFx.createStrokeWidthAnimator(sprite, 0).run(250);
             }
           });




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Tooltip Example
           private LabelProvider<Number> million = new LabelProvider<Number>() {
             @Override
             public String getLabel(Number item) {
               int value = item.intValue() / 1000000;
               return value + "M";
             }
          };

              SeriesToolTipConfig<Movies> config = new SeriesToolTipConfig<Movies>();
              config.setNumericLabelProvider(million);
              bar.setToolTipConfig(config);




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Label Example
             PieSeries<Data> series = new PieSeries<Data>();
             series.setAngleField(dataAccess.data1());
             series.addLengthField(dataAccess.data2());
             series.setHighlighting(true);
             TextSprite textConfig = new TextSprite();
             textConfig.setFont("Arial");
             textConfig.setFontSize(14);
             textConfig.setTextAnchor(TextAnchor.MIDDLE);
             textConfig.setFill(RGB.WHITE);
             SeriesLabelConfig<Data> labelConfig = new SeriesLabelConfig<Data>();
             labelConfig.setNumericLabelProvider(null);
             labelConfig.setValueProvider(dataAccess.name(), new LabelProvider<String>() {
               @Override
               public String getLabel(String item) {
                 return item.substring(0, 3);
               }
             });
             labelConfig.setSpriteConfig(textConfig);
             series.setLabelConfig(labelConfig);
             chart.addSeries(series);




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Live Example
              line.setMarkerIndex(1);

              TimeAxis<Site> time = new TimeAxis<Site>();
              time.setField(siteAccess.date());
              time.setStartDate(f.parse("Feb 1"));
              time.setEndDate(f.parse("Feb 7"));
              time.setLabelProvider(new LabelProvider<Date>() {
                @Override
                public String getLabel(Date item) {
                  return f.format(item);
                }
              });
              chart.addAxis(time);




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Animation Example
           private Animator createRadiusAnimator(final CircleSprite sprite, double
           radius) {
            final double origin = sprite.getRadius();
            final double delta = radius - origin;
            return new Animator() {
               @Override
               protected void onUpdate(double progress) {
                 sprite.setRadius(origin + (delta * progress));
                 sprite.redraw();
               }
            };
          }




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Questions?




Wednesday, November 2, 2011

More Related Content

Similar to Charting & Data Visualization in Ext GWT 3.0

Ext GWT 3.0 Theming and Appearances
Ext GWT 3.0 Theming and AppearancesExt GWT 3.0 Theming and Appearances
Ext GWT 3.0 Theming and Appearances
Sencha
 
A Divine Data Comedy
A Divine Data ComedyA Divine Data Comedy
A Divine Data Comedy
Mike Harris
 
Sql server lab_2
Sql server lab_2Sql server lab_2
Sql server lab_2
vijay venkatash
 
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Databricks
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applications
Kexin Xie
 
Stata cheat sheet: data transformation
Stata  cheat sheet: data transformationStata  cheat sheet: data transformation
Stata cheat sheet: data transformation
Tim Essam
 
Neo4j
Neo4jNeo4j
Suit case class
Suit case classSuit case class
Suit case class
Didier Plaindoux
 
Chapter 3 Built-in Data Structures, Functions, and Files .pptx
Chapter 3 Built-in Data Structures, Functions, and Files .pptxChapter 3 Built-in Data Structures, Functions, and Files .pptx
Chapter 3 Built-in Data Structures, Functions, and Files .pptx
SovannDoeur
 
Tuples All the Way Down
Tuples All the Way DownTuples All the Way Down
Tuples All the Way Down
Giovanni Fernandez-Kincade
 
Data import-cheatsheet
Data import-cheatsheetData import-cheatsheet
Data import-cheatsheet
Dieudonne Nahigombeye
 
Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced Templates
Sencha
 
Pandas,scipy,numpy cheatsheet
Pandas,scipy,numpy cheatsheetPandas,scipy,numpy cheatsheet
Pandas,scipy,numpy cheatsheet
Dr. Volkan OBAN
 

Similar to Charting & Data Visualization in Ext GWT 3.0 (13)

Ext GWT 3.0 Theming and Appearances
Ext GWT 3.0 Theming and AppearancesExt GWT 3.0 Theming and Appearances
Ext GWT 3.0 Theming and Appearances
 
A Divine Data Comedy
A Divine Data ComedyA Divine Data Comedy
A Divine Data Comedy
 
Sql server lab_2
Sql server lab_2Sql server lab_2
Sql server lab_2
 
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
Scaling Up: How Switching to Apache Spark Improved Performance, Realizability...
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applications
 
Stata cheat sheet: data transformation
Stata  cheat sheet: data transformationStata  cheat sheet: data transformation
Stata cheat sheet: data transformation
 
Neo4j
Neo4jNeo4j
Neo4j
 
Suit case class
Suit case classSuit case class
Suit case class
 
Chapter 3 Built-in Data Structures, Functions, and Files .pptx
Chapter 3 Built-in Data Structures, Functions, and Files .pptxChapter 3 Built-in Data Structures, Functions, and Files .pptx
Chapter 3 Built-in Data Structures, Functions, and Files .pptx
 
Tuples All the Way Down
Tuples All the Way DownTuples All the Way Down
Tuples All the Way Down
 
Data import-cheatsheet
Data import-cheatsheetData import-cheatsheet
Data import-cheatsheet
 
Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced Templates
 
Pandas,scipy,numpy cheatsheet
Pandas,scipy,numpy cheatsheetPandas,scipy,numpy cheatsheet
Pandas,scipy,numpy cheatsheet
 

More from Sencha

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
Sencha
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 Highlights
Sencha
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
Sencha
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha
 
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Sencha
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
Sencha
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Sencha
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
Sencha
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
Sencha
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
Sencha
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
Sencha
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
Sencha
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
Sencha
 

More from Sencha (20)

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 Highlights
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop First
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
 

Recently uploaded

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 

Recently uploaded (20)

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 

Charting & Data Visualization in Ext GWT 3.0

  • 2. DRAWING AND CHARTING Brendan Coughran, Sencha @whereisthysting Wednesday, November 2, 2011
  • 4. Surface SVG Engine VML Engine Canvas Engine Sprite Wednesday, November 2, 2011
  • 5. Surface SVG Engine VML Engine Canvas Engine Sprite Wednesday, November 2, 2011
  • 7. Surface Vector Primitives Text Images Gradients Wednesday, November 2, 2011
  • 9. Sprite Abstracted drawing elements Normalizes differences between engine API syntax Attributes Events Transforms Animations Wednesday, November 2, 2011
  • 10. DrawComponent Extends Component Contains surface Layout participation <replace-with class='com.sencha.gxt.chart.client.draw.engine.SVG'> <when-type-is class='com.sencha.gxt.chart.client.draw.Surface' /> </replace-with> <replace-with class='com.sencha.gxt.chart.client.draw.engine.VML'> <when-type-is class='com.sencha.gxt.chart.client.draw.Surface' /> <any> <when-property-is name='user.agent' value='ie6' /> <when-property-is name='user.agent' value='ie8' /> </any> </replace-with> Wednesday, November 2, 2011
  • 11. DrawComponent Example DrawComponent component = new DrawComponent(); PathSprite path = new PathSprite(); path.addCommand(new MoveTo(75, 75)); path.addCommand(new CurveTo(0, -25, 50, 25, 50, 0, true)); path.addCommand(new CurveTo(0, -25, -50, 25, -50, 0, true)); path.setStroke(new RGB("#000")); path.setStrokeWidth(2); path.setFill(new RGB("#fc0")); path.setFillOpacity(0.25); component.addSprite(path); component.redraw(); Wednesday, November 2, 2011
  • 17. Chart Example ListStore<Data> store = new ListStore<Data>(dataAccess.nameKey()); store.addAll(TestData.getData(12, 0, 100)); Chart<Data> chart = new Chart<Data>(); chart.setStore(store); chart.setChartShadow(true); Wednesday, November 2, 2011
  • 18. Scatter Example NumericAxis<Data> axis = new NumericAxis<Data>(); axis.setPosition(Position.LEFT); axis.addField(dataAccess.data1()); axis.addField(dataAccess.data2()); axis.addField(dataAccess.data3()); TextSprite title = new TextSprite("Number of Hits"); title.setFontSize(18); axis.setTitleConfig(title); chart.addAxis(axis); ScatterSeries<Data> series = new ScatterSeries<Data>(); series.setYAxisPosition(Position.LEFT); series.setYField(dataAccess.data1()); series.setMarkerColor(RGB.GREEN); series.setMarkerType(Shape.CROSS); series.setMarkerSize(8); series.setHighlighting(true); chart.addSeries(series); Wednesday, November 2, 2011
  • 21. Bar Example CategoryAxis<Data, String> catAxis = new CategoryAxis<Data, String>(); catAxis.setPosition(Position.LEFT); catAxis.setField(dataAccess.name()); title = new TextSprite("Month of the Year"); title.setFontSize(18); catAxis.setTitleConfig(title); chart.addAxis(catAxis); BarSeries<Data> bar = new BarSeries<Data>(); bar.setYAxisPosition(Position.BOTTOM); bar.addYField(dataAccess.data1()); bar.addColor(RGB.GREEN); bar.setHighlighting(true); chart.addSeries(bar); Wednesday, November 2, 2011
  • 24. Line Example Legend<Data> legend = new Legend<Data>(); legend.setPosition(Position.RIGHT); legend.setItemHighlighting(false); legend.setItemHiding(true); chart.setLegend(legend); LineSeries<Data> series = new LineSeries<Data>(); series.setYAxisPosition(Position.LEFT); series.setYField(dataAccess.data1()); series.setStroke(RGB.RED); series.setShowMarkers(true); series.setMarkerType(Shape.CROSS); series.setMarkerSize(6); series.setMarkerColor(RGB.RED); series.setHighlighting(true); chart.addSeries(series); Wednesday, November 2, 2011
  • 27. Area Example AreaSeries<Data> series = new AreaSeries<Data>(); series.setYAxisPosition(Position.LEFT); series.setOpacity(0.93); series.addYField(dataAccess.data1()); series.addYField(dataAccess.data2()); series.addYField(dataAccess.data3()); series.addYField(dataAccess.data4()); series.addYField(dataAccess.data5()); series.addYField(dataAccess.data6()); series.addYField(dataAccess.data7()); series.addColor(new RGB(148, 174, 10)); series.addColor(new RGB(17, 95, 166)); series.addColor(new RGB(166, 17, 32)); series.addColor(new RGB(255, 136, 9)); series.addColor(new RGB(255, 209, 62)); series.addColor(new RGB(166, 17, 135)); series.addColor(new RGB(36, 173, 154)); chart.addSeries(series); Wednesday, November 2, 2011
  • 30. Gauge Example GaugeAxis<Data> axis = new GaugeAxis<Data>(); axis.setMargin(10); axis.setMinimum(0); axis.setMaximum(100); chart.addAxis(axis); GaugeSeries<Data> gauge = new GaugeSeries<Data>(); gauge.addColor(color); gauge.addColor(new RGB("#ddd")); gauge.setAngleField(provider); gauge.setNeedle(needle); gauge.setDonut(donut); chart.addSeries(gauge); Wednesday, November 2, 2011
  • 33. Radar Example RadialAxis<Data, String> axis = new RadialAxis<Data, String>(); axis.setCategoryField(dataAccess.name()); chart.addAxis(axis); RadarSeries<Data> radar = new RadarSeries<Data>(); radar.setYField(dataAccess.data1()); radar.setStroke(RGB.RED); radar.setShowMarkers(true); radar.setMarkerType(Shape.CIRCLE); radar.setMarkerColor(RGB.RED); chart.addSeries(radar); Wednesday, November 2, 2011
  • 36. Pie Example PieSeries<Data> series = new PieSeries<Data>(); series.setAngleField(dataAccess.data1()); chart.addSeries(series); Gradient slice1 = new Gradient("slice1", 45); slice1.addStop(new Stop(0, new RGB(148, 174, 10))); slice1.addStop(new Stop(100, new RGB(107, 126, 7))); chart.addGradient(slice1); series.addColor(slice1); Wednesday, November 2, 2011
  • 39. Customization and Interactivity Wednesday, November 2, 2011
  • 40. Events series.addSeriesSelectionHandler(new SeriesSelectionHandler() { @Override public void onSeriesClick(SeriesSelectionEvent event) { Info.display("Click", NumberFormat.getFormat("0").format (event.getValue())); } }); Wednesday, November 2, 2011
  • 43. Mixed Example BarSeries<Data> bar = new BarSeries<Data>(); bar.setYAxisPosition(Position.LEFT); bar.addYField(dataAccess.data1()); bar.setColumn(true); bar.addColor(new RGB(240, 165, 10)); bar.setShownInLegend(false); chart.addSeries(bar); ScatterSeries<Data> scatter = new ScatterSeries<Data>(); scatter.setYAxisPosition(Position.LEFT); scatter.setYField(dataAccess.data2()); scatter.setMarkerType(Shape.CIRCLE); scatter.setMarkerSize(6); scatter.setMarkerColor(RGB.RED); scatter.setLegendTitle("Scatter"); chart.addSeries(scatter); LineSeries<Data> line = new LineSeries<Data>(); line.setYAxisPosition(Position.LEFT); line.setYField(dataAccess.data3()); line.setStroke(RGB.BLUE); line.setSmooth(true); line.setFill(new RGB(32, 68, 186)); line.setLegendTitle("Line"); chart.addSeries(line); Wednesday, November 2, 2011
  • 46. Renderer Example column.setRenderer(new SeriesRenderer<Data>() { @Override public Sprite spriteRenderer(Sprite sprite, int index, ListStore<Data> store) { sprite.setFill(colors[index % colors.length]); return sprite; } }); column.setHighlighter(new SeriesHighlighter() { @Override public void hightlight(Sprite sprite) { sprite.setStroke(new RGB(85, 85, 204)); DrawFx.createStrokeWidthAnimator(sprite, 3).run(250); } @Override public void unhightlight(Sprite sprite) { sprite.setStroke(Color.NONE); DrawFx.createStrokeWidthAnimator(sprite, 0).run(250); } }); Wednesday, November 2, 2011
  • 49. Tooltip Example private LabelProvider<Number> million = new LabelProvider<Number>() { @Override public String getLabel(Number item) { int value = item.intValue() / 1000000; return value + "M"; } }; SeriesToolTipConfig<Movies> config = new SeriesToolTipConfig<Movies>(); config.setNumericLabelProvider(million); bar.setToolTipConfig(config); Wednesday, November 2, 2011
  • 52. Label Example PieSeries<Data> series = new PieSeries<Data>(); series.setAngleField(dataAccess.data1()); series.addLengthField(dataAccess.data2()); series.setHighlighting(true); TextSprite textConfig = new TextSprite(); textConfig.setFont("Arial"); textConfig.setFontSize(14); textConfig.setTextAnchor(TextAnchor.MIDDLE); textConfig.setFill(RGB.WHITE); SeriesLabelConfig<Data> labelConfig = new SeriesLabelConfig<Data>(); labelConfig.setNumericLabelProvider(null); labelConfig.setValueProvider(dataAccess.name(), new LabelProvider<String>() { @Override public String getLabel(String item) { return item.substring(0, 3); } }); labelConfig.setSpriteConfig(textConfig); series.setLabelConfig(labelConfig); chart.addSeries(series); Wednesday, November 2, 2011
  • 55. Live Example line.setMarkerIndex(1); TimeAxis<Site> time = new TimeAxis<Site>(); time.setField(siteAccess.date()); time.setStartDate(f.parse("Feb 1")); time.setEndDate(f.parse("Feb 7")); time.setLabelProvider(new LabelProvider<Date>() { @Override public String getLabel(Date item) { return f.format(item); } }); chart.addAxis(time); Wednesday, November 2, 2011
  • 58. Animation Example private Animator createRadiusAnimator(final CircleSprite sprite, double radius) { final double origin = sprite.getRadius(); final double delta = radius - origin; return new Animator() { @Override protected void onUpdate(double progress) { sprite.setRadius(origin + (delta * progress)); sprite.redraw(); } }; } Wednesday, November 2, 2011