Skip to content

Instantly share code, notes, and snippets.

@xeraa
Created February 18, 2012 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xeraa/1856571 to your computer and use it in GitHub Desktop.
Save xeraa/1856571 to your computer and use it in GitHub Desktop.
Simple example on the usage of Highcharts
ISeries a = new NumberSeries("Series A").setData(new Number[]{7.0, 6.9, 9.5, 10.2, 12.2, 13.9});
ISeries b = new NumberSeries("Series B").setData(new Number[]{1.0, 3.5, 5.5, 1.22, 4.2, 1.9});
Highchart highchart = new Highchart(new LineChart(), a, b);
highchart.setTitle(new ChartTitle("LineChart"));
highchart.setSubtitle(new Subtitle("Mixed Series"));
highchart.getXAxis().setTitle(new AxisTitle("Time"));
highchart.getYAxis().setTitle(new AxisTitle("Amount"));
highchart.getChart().setZoomType(ZoomType.x);
add(new HighchartsPanel("chart", highchart));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment