Directory

← Back

HighChartsAPI Add-on

Highcharts API

Author

Rating

Popularity

<100

This is a simple-to-use API for generating Charts with the HighCharts API.

I'm trying to improve my AddOn as fast as possible, please let me know if it should contain any new feature soon and rate for my AddOn if you like it.

Implemented Features are

  • Area Chart
  • Bar Chart
  • Column Chart
  • Line Chart
  • Pie Chart
  • ChartConfiguration
  • PlotOptions (per-chart-type)
  • DataSeries

Since v2.2.0

  • AreaRange Chart
  • AreaSpline Chart
  • AreaSplineRange Chart
  • Boxplot Chart
  • Bubble Chart
  • ColumnRange Chart
  • ErrorBar Chart
  • Funnel Chart

Since v2.2.1-QF

  • Fixed #13
  • Fixed #14
  • Fixed #22

Sample code

  // *** PIE ***
        ChartConfiguration pieConfiguration = new ChartConfiguration();
        pieConfiguration.setTitle("TestPie");
        pieConfiguration.setChartType(ChartType.PIE);
        pieConfiguration.setBackgroundColor(Colors.WHITE);

        PieChartSeries pieFruits = new PieChartSeries("Fruits");
        PieChartData bananas = new PieChartData("Bananas", 33.2);
        PieChartData melons = new PieChartData("Melons", 6.21);
        PieChartData apples = new PieChartData("Apples", 3.44);

        pieFruits.getData().add(bananas);
        pieFruits.getData().add(melons);
        pieFruits.getData().add(apples);


        pieConfiguration.getSeriesList().add(pieFruits);
        try {
            HighChart pieChart = HighChartFactory.renderChart(pieConfiguration);
            pieChart.setHeight(80, Unit.PERCENTAGE);
            pieChart.setWidth(80, Unit.PERCENTAGE);
            System.out.println("PieChart Script : " + pieConfiguration.getHighChartValue());
            layout.addComponent(pieChart);
            layout.setComponentAlignment(pieChart, Alignment.MIDDLE_CENTER);
        } catch (NoChartTypeException e) {
            e.printStackTrace();
        }


        // *** LINE ***
        ChartConfiguration lineConfiguration = new ChartConfiguration();
        lineConfiguration.setTitle("TestLine");
        lineConfiguration.setChartType(ChartType.LINE);
        lineConfiguration.setBackgroundColor(Colors.WHITE);

            List<Object> bananaValues = new ArrayList<Object>();
            bananaValues.add(11.3);
            bananaValues.add(25.1);
            bananaValues.add(32.7);

            LineChartSeries bananaLine = new LineChartSeries("Bananas", bananaValues);

            List<Object> sweetValues = new ArrayList<Object>();
            sweetValues.add(33.65);
            sweetValues.add(63.24);
            sweetValues.add(21.52);

            LineChartSeries choclateLine = new LineChartSeries("Choclate", sweetValues);

        lineConfiguration.getSeriesList().add(bananaLine);
        lineConfiguration.getSeriesList().add(choclateLine);

        try {
            HighChart lineChart = HighChartFactory.renderChart(lineConfiguration);
            lineChart.setHeight(80, Unit.PERCENTAGE);
            lineChart.setWidth(80, Unit.PERCENTAGE);
            System.out.println("LineChart Script : " + lineConfiguration.getHighChartValue());
            layout.addComponent(lineChart);
            layout.setComponentAlignment(lineChart, Alignment.MIDDLE_CENTER);

        } catch (NoChartTypeException e) {
            e.printStackTrace();
        }
        setContent(layout);
ChartConfiguration config = new ChartConfiguration();
config.setChartType(ChartType.LINE);

Axis xAxis = new Axis(Axis.AxisType.xAxis);

xAxis.getCategories().add("My First Category");
xAxis.getCategories().add("My Second Category");
xAxis.setLineColor(Color.BLUE);
xAxis.setTickLength(20);

config.setxAxis(xAxis);

HighChart chart = HighChartFactory.renderChart(config);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

  • Fixed #13
  • Fixed #14
  • Fixed #22

I promised these fixes very long ago and I am very sorry this little code took so long to be released...

I have not much time to improve this addon and things are slowing down.

Still, I am working on it and there will be furhter releases.

For now, here's a Quick-Fix Version for theses poor mistakes.

Released
2016-06-21
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Browser
Browser Independent

HighChartsAPI Add-on - Vaadin Add-on Directory

Highcharts API HighChartsAPI Add-on - Vaadin Add-on Directory
This is a simple-to-use API for generating Charts with the HighCharts API. I'm trying to improve my AddOn as fast as possible, please let me know if it should contain any new feature soon and rate for my AddOn if you like it. Implemented Features are + Area Chart + Bar Chart + Column Chart + Line Chart + Pie Chart + ChartConfiguration + PlotOptions (per-chart-type) + DataSeries Since v2.2.0 + AreaRange Chart + AreaSpline Chart + AreaSplineRange Chart + Boxplot Chart + Bubble Chart + ColumnRange Chart + ErrorBar Chart + Funnel Chart Since v2.2.1-QF + Fixed #13 + Fixed #14 + Fixed #22
Author Homepage
Issue Tracker
Source Code
Project Page
Online Demo

HighChartsAPI Add-on version 1.5
Basic functionality is implemented. More updates will be uploaded soon.

HighChartsAPI Add-on version 1.6
+ Different instantiation (!!!) - Take a look at the Code Samples for further info! + Empty Title + Default Background is now transparent + LineChart + BarChart + Margin for Chart + Colors interface + Changing Chart Colors + (JavaDoc) + (Demo UI)

HighChartsAPI Add-on version 1.7
+ Axis Component improvements + PieChartPlotOptions (Will defaultly be used when none is set) + Changed default chart look & feel + Removed xAxis, yAxis components

HighChartsAPI Add-on version 1.7.1
**Pre-Release** + Axis Component improvements (Axis Title, GridLine Behavior) + ChartConfiguration improvements

HighChartsAPI Add-on version 1.7.2
+ Version problem solved (Addon was bound to Vaadin 7.4.2) + Added AreaChartSeries + Added AreaChartPlotOptions + Added BarChartPlotOptions + Added ColumnChartPlotOptions + Added LineChartPlotOptions + Changed default chartConfiguration behaviour + Added 'default colors' to chartConfiguration

HighChartsAPI Add-on version 2.0.0
***QUICK FIX!*** Many people had problems to compile the widgetset with Vaadin 7.4.8! This version should do it for you. Also fixed issues: + Fixed issue #2 + Fixed issue #4

HighChartsAPI Add-on version 2.1.2
+ Fixed issue #7 + Fixed issue #9

HighChartsAPI Add-on version 2.1.3
- Maven layout fix.

HighChartsAPI Add-on version 2.2.0
Basically this release contains many more chart types, with an all-new Data-API (type-safe). Also, I heard many people had problems using maven or ivy for dep management. I think this was a problem from my old maven setup which was a bit dizzy. So now I changed the whole layout and this annoying problem should be solved! + Project setup fix + Fixed a maven issue where you got a "could not read artifact descriptor" error + Added 'reRendering()' functionality - experimental + PlotOptions merged into single-file-pattern + Added many remaining Chart types (not all tested yet) There is one minor change in the usage of this API, you should now use type-safe **HighChartsData** implementations for your data series. You can take a look at my Demo UI for usage information!

HighChartsAPI Add-on version 2.2.1
Basically this release contains many more chart types, with an all-new Data-API (type-safe). Also, I heard many people had problems using maven or ivy for dep management. I think this was a problem from my old maven setup which was a bit dizzy. So now I changed the whole layout and this annoying problem should be solved! + Project setup fix + Fixed a maven issue where you got a "could not read artifact descriptor" error + Added 'reRendering()' functionality - experimental + PlotOptions merged into single-file-pattern + Added many remaining Chart types (not all tested yet) + Fixed Issue #13 + Fixed Issue #14 There is one minor change in the usage of this API, you should now use type-safe **HighChartsData** implementations for your data series. You can take a look at my Demo UI for usage information!

HighChartsAPI Add-on version 2.2.1-QF
+ Fixed #13 + Fixed #14 + Fixed #22 I promised these fixes very long ago and I am very sorry this little code took so long to be released... I have not much time to improve this addon and things are slowing down. Still, I am working on it and there will be furhter releases. For now, here's a Quick-Fix Version for theses poor mistakes.

Online