94
GWT Charts
GWT does not contain pre installed repository for creation of charts. We can download its repository from maven repository. In gwt, charts are created through gwt chart tools also known as Google Visualization.
To setup the GWT Charts, we follow following steps:
- Copy the gwt-charts.jar to the existing project or for new project.
- Right click the jar file and choose build path option then add to build path option.
- To use maven repository we change the XML file by adding following code:
List of GWT Charts:
- Annotation
- Area
- Bar
- Bubble
- Calendar
- Candlestick
- Geo chart
- Histogram
- Map
- Pie chart etc.
GWT Chart Example
In this code, we implement the Area chart where area is shown according to the coffee production order.
Output:
GWT Charts Controls
GWT charts have control features which enables chart creation to be in different control regions.
Here are the few controls:
- Category Filter
- Chart Range Filter
- Date Range Filter
- Number Range Filter
- String Filter
GWT Chart Example
Below code is of the Chart Range Filter:
Output:
Next TopicGWT Database