GWT Highcharts Tutorial
Selected Reading
- GWT Highcharts - Discussion
- GWT Highcharts - Useful Resources
- GWT Highcharts - Quick Guide
- GWT Highcharts - Map Charts
- GWT Highcharts - 3D Charts
- GWT Highcharts - Combinations
- GWT Highcharts - Dynamic Charts
- GWT Highcharts - Scatter Chart
- GWT Highcharts - Pie Charts
- GWT Highcharts - Column Charts
- GWT Highcharts - Bar Charts
- GWT Highcharts - Area Charts
- GWT Highcharts - Line Charts
- Configuration Syntax
- Environment Setup
- GWT Highcharts - Overview
- GWT Highcharts - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
GWT Highcharts - Scatter Chart
GWT Highcharts - Scatter Chart
Following is an example of a basic scatter chart.
We have already seen the configuration used to draw a chart in
chapter.An example of a basic scatter chart is given below.
Configurations
Let us now see the additional configurations/steps taken.
series
Configure the chart type to be scatter based. series.type decides the series type for the chart. Here, the default value is "pne".
chart.addSeries(chart.createSeries() .setName("Observations") .setType(Type.SCATTER) .setPoints(new Number[] { 1, 1.5, 2.8, 3.5, 3.9, 4.2 }) );
Example
HelloWorld.java
package com.tutorialspoint.cpent; import org.moxieapps.gwt.highcharts.cpent.Chart; import org.moxieapps.gwt.highcharts.cpent.Series.Type; import com.google.gwt.core.cpent.EntryPoint; import com.google.gwt.user.cpent.ui.RootPanel; pubpc class HelloWorld implements EntryPoint { pubpc void onModuleLoad() { final Chart chart = new Chart() .setChartTitleText("Scatter plot"); chart.getXAxis() .setMin(-0.5) .setMax(5.5); chart.getYAxis() .setMin(0); chart.addSeries(chart.createSeries() .setName("Observations") .setType(Type.SCATTER) .setPoints(new Number[] { 1, 1.5, 2.8, 3.5, 3.9, 4.2 }) ); RootPanel.get().add(chart); } }
Result
Verify the result.
Advertisements