{"id":35067,"date":"2016-03-16T15:00:14","date_gmt":"2016-03-16T13:00:14","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=35067"},"modified":"2019-04-09T13:23:08","modified_gmt":"2019-04-09T10:23:08","slug":"vaadin-charts-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/","title":{"rendered":"Vaadin Charts Example"},"content":{"rendered":"<p>Vaadin charts are beautiful eye candy charts to enrich your applications. Using Vaadin charts could make the difference when you need to sell the application to the end user.<\/p>\n<h2>1. The tools<\/h2>\n<ul>\n<li>Java JDK 8<\/li>\n<li>Latest Eclipse Mars<\/li>\n<li>Vaadin plugin for eclipse<\/li>\n<li>Vaadin charts<\/li>\n<\/ul>\n<h2>2. Introduction<\/h2>\n<p>Vaadin charts offer more than twenty kinds of charts. You can find for sure a chart to fill your needs in data presentation UI, the charts are very easy to use and use html5 and there is no need to install any plug-ins and you can use it directly from Java. In this example I am going to show how to configure the Vaadin Charts in eclipse using Ivy and make four charts of different kinds.<\/p>\n<h2>3. Prerequisites<\/h2>\n<ul>\n<li>JDK installed<\/li>\n<li>Eclipse Mars installed and working<\/li>\n<li>Vaadin plugin installed and working<\/li>\n<\/ul>\n<h2>4. Set up the project<\/h2>\n<p>In the file menu choose File -&gt; New -&gt; Other<\/p>\n<p><figure id=\"attachment_34378\" aria-describedby=\"caption-attachment-34378\" style=\"width: 646px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-New-Project-1.png\" rel=\"attachment wp-att-34378\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-New-Project-1.png\" alt=\"01 New Project\" width=\"646\" height=\"422\" class=\"size-full wp-image-34378\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-New-Project-1.png 646w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-New-Project-1-300x196.png 300w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/a><figcaption id=\"caption-attachment-34378\" class=\"wp-caption-text\">01 New Project<\/figcaption><\/figure><\/p>\n<p>Now from the list choose Vaadin 7 project:<\/p>\n<p><figure id=\"attachment_34379\" aria-describedby=\"caption-attachment-34379\" style=\"width: 524px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-Vaadin-Project-1.png\" rel=\"attachment wp-att-34379\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-Vaadin-Project-1.png\" alt=\"02 Vaadin Project\" width=\"524\" height=\"499\" class=\"size-full wp-image-34379\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-Vaadin-Project-1.png 524w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-Vaadin-Project-1-300x286.png 300w\" sizes=\"(max-width: 524px) 100vw, 524px\" \/><\/a><figcaption id=\"caption-attachment-34379\" class=\"wp-caption-text\">02 Vaadin Project<\/figcaption><\/figure><\/p>\n<p>Hit next and name your project then hit finish.<\/p>\n<h2>5. Set up Vaadin Charts<\/h2>\n<h3>5.1 The license<\/h3>\n<p>Go to the Vaadin website and sing up to get an evaluation license <code>vaadin.charts.developer.license<\/code> of <a href=\"https:\/\/vaadin.com\/charts\" target=\"_blank\" rel=\"noopener noreferrer\">Vaadin Charts<\/a>, download the license and put it in your home directory. If you are in Windows, you home directory is on <code>C:\\Users\\Username<\/code>, on Linux and OSX your home directory is <code>~\/<\/code>. Just put the license there and you are fine.<\/p>\n<h3>5.2 The repositories<\/h3>\n<p>Now to get the Vaadin charts jar, you need to get the jar from the Maven repository,here I am using Ivy for that task so edit the file <code>ivy.xml<\/code> in the root of your project and add the following node into the dependencies node.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Vaadin Charts dependency<\/em><\/span><\/p>\n<pre class=\"brush:xml\">\t\t&lt;dependency\n\t\t   org=\"com.vaadin.addon\"\n\t\t   name=\"vaadin-charts\"\n\t\t   rev=\"3.0.0-beta1\" \/&gt;\n<\/pre>\n<p>Now the <code>ivy.xml<\/code> should look like this:<\/p>\n<p><span style=\"text-decoration: underline\"><em>ivy.xml<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\"?&gt;\n&lt;!DOCTYPE ivy-module [\n\t&lt;!ENTITY vaadin.version \"7.6.3\"&gt;\n]&gt;\n&lt;ivy-module version=\"2.0\"\n\txmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n\txsi:noNamespaceSchemaLocation=\"http:\/\/ant.apache.org\/ivy\/schemas\/ivy.xsd\"&gt;\n\t&lt;info organisation=\"com.example\" module=\"v7proj\" \/&gt;\n\t&lt;configurations&gt;\n\t\t&lt;!-- The default configuration, which should be deployed to the server --&gt;\n\t\t&lt;conf name=\"default\" \/&gt;\n\t\t&lt;!-- A configuration only needed when compiling the widget set. Should \n\t\t\tnot be deployed to the server --&gt;\n\t\t&lt;conf name=\"widgetset-compile\" \/&gt;\n\t\t&lt;!-- A configuration used in compilation of server side classes only.\n\t\t\tShould be deployed to the server --&gt;\n\t\t&lt;conf name=\"nodeploy\" \/&gt;\n\t&lt;\/configurations&gt;\n\t&lt;dependencies defaultconf=\"default\" defaultconfmapping=\"default-&gt;default\"&gt;\n\t\t&lt;!-- The core server part of Vaadin --&gt;\n\t\t&lt;dependency org=\"com.vaadin\" name=\"vaadin-server\" rev=\"&amp;vaadin.version;\" \/&gt;\n\n\t\t&lt;!-- Vaadin themes --&gt;\n\t\t&lt;dependency org=\"com.vaadin\" name=\"vaadin-themes\" rev=\"&amp;vaadin.version;\" \/&gt;\n\n\t\t&lt;!-- Push support --&gt;\n\t\t&lt;dependency org=\"com.vaadin\" name=\"vaadin-push\" rev=\"&amp;vaadin.version;\" \/&gt;\n\n\t\t&lt;!-- Servlet 3.0 API --&gt;\n\t\t&lt;dependency org=\"javax.servlet\" name=\"javax.servlet-api\" rev=\"3.0.1\" conf=\"nodeploy-&gt;default\" \/&gt;\n\n\t\t&lt;!-- Precompiled DefaultWidgetSet --&gt;\n\t\t&lt;dependency org=\"com.vaadin\" name=\"vaadin-client-compiled\"\n\t\t\trev=\"&amp;vaadin.version;\" \/&gt;\n\n\t\t&lt;!-- Vaadin client side, needed for widget set compilation --&gt;\n\t\t&lt;dependency org=\"com.vaadin\" name=\"vaadin-client\" rev=\"&amp;vaadin.version;\"\n\t\t\t conf=\"widgetset-compile-&gt;default\" \/&gt;\n\n\t\t&lt;!-- Compiler for custom widget sets. Should not be deployed --&gt;\n\t\t&lt;dependency org=\"com.vaadin\" name=\"vaadin-client-compiler\"\n\t\t\trev=\"&amp;vaadin.version;\" conf=\"widgetset-compile-&gt;default\" \/&gt;\n\n\t\t&lt;dependency\n\t\t   org=\"com.vaadin.addon\"\n\t\t   name=\"vaadin-charts\"\n\t\t   rev=\"3.0.0-beta1\" \/&gt;\n\t\t\n\t&lt;\/dependencies&gt;\n&lt;\/ivy-module&gt;\n<\/pre>\n<h2>6. Compile Widgetset<\/h2>\n<p>After you add the dependency, you need to compile the Vaadin widgetset in order to use the Vaadin charts, go to the Vaadin Menu in the eclipse toolbar and choose compile widgetset.<\/p>\n<p><figure id=\"attachment_35075\" aria-describedby=\"caption-attachment-35075\" style=\"width: 481px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/03-Compile-Widgetset.png\" rel=\"attachment wp-att-35075\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/03-Compile-Widgetset.png\" alt=\"03 Compile Widgetset\" width=\"481\" height=\"260\" class=\"size-full wp-image-35075\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/03-Compile-Widgetset.png 481w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/03-Compile-Widgetset-300x162.png 300w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><\/a><figcaption id=\"caption-attachment-35075\" class=\"wp-caption-text\">03 Compile Widgetset<\/figcaption><\/figure><\/p>\n<p>If everything is okay you should get something like this in the tail of the eclipse console output:<\/p>\n<p><span style=\"text-decoration: underline\"><em>output console tail<\/em><\/span><\/p>\n<pre class=\"brush:bash\">   Compile of permutations succeeded\n   Compilation succeeded -- 115,650s\nLinking into \n   Link succeeded\n   Linking succeeded -- 0,973s\n<\/pre>\n<h2>7. Coding the example<\/h2>\n<h3>7.1 Init Method<\/h3>\n<p><span style=\"text-decoration: underline\"><em>Init Method<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tprotected void init(VaadinRequest request) {\n\t\t   final VerticalLayout layout = new VerticalLayout();\n\t\t   layout.setMargin(true);\n\t\t   setContent(layout);\n\t\t   \n\t\t   HorizontalLayout line01 = new HorizontalLayout();\n\t\t   HorizontalLayout line02 = new HorizontalLayout();\n\t\t   \n\t\t   line01.addComponent(getLineChart());\n\t\t   line01.addComponent(getWaterfallChart());\n\t\t   line02.addComponent(getPieChart());\n\t\t   line02.addComponent(getFunnelChart());\n\t\t   layout.addComponent(line01);\n\t\t   layout.addComponent(line02);\n\t}\n<\/pre>\n<p>For the main view I created a vertical layout an inside the vertical layout I put two horizontal layouts to the four examples on a single page, every chart is inside a method for clarity.<\/p>\n<h3>7.2 Line Chart<\/h3>\n<p>Line chart is a two dimensional chart that you can use to on a multiple scenarios.<\/p>\n<p><figure id=\"attachment_35097\" aria-describedby=\"caption-attachment-35097\" style=\"width: 317px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/04-Line-Chart.png\" rel=\"attachment wp-att-35097\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/04-Line-Chart.png\" alt=\"04 Line Chart\" width=\"317\" height=\"305\" class=\"size-full wp-image-35097\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/04-Line-Chart.png 317w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/04-Line-Chart-300x289.png 300w\" sizes=\"(max-width: 317px) 100vw, 317px\" \/><\/a><figcaption id=\"caption-attachment-35097\" class=\"wp-caption-text\">04 Line Chart<\/figcaption><\/figure><\/p>\n<p>First I create the chart and assign a fixed size of 300&#215;300 pixels.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Create chart<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t   Chart chart = new Chart();\n\t   chart.setWidth(\"300px\");\n\t   chart.setHeight(\"300px\");\n<\/pre>\n<p>Create a configuration Object to set the type of chart and the title.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><span style=\"text-decoration: underline\"><em>Configuration<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t   Configuration conf = chart.getConfiguration();\n\t   conf.getChart().setType(ChartType.LINE);\n\t   conf.setTitle(\"Line Chart\");\n<\/pre>\n<p>Create the data to be show in the chart using a DataSeries object for that and then add the dataseries to the configuration of the chart.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Dataseries<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t   DataSeries serie1 = new DataSeries(\"SERIE 1\");\n\t   serie1.add(new DataSeriesItem(0,0));\n\t   serie1.add(new DataSeriesItem(1,1));\n\t   serie1.add(new DataSeriesItem(2,2));\n\t   serie1.add(new DataSeriesItem(3,3));\n\t   serie1.add(new DataSeriesItem(4,4));\n\t   conf.addSeries(serie1);\n\n\t   DataSeries serie2 = new DataSeries(\"SERIE 2\");\n\t   serie2.add(new DataSeriesItem(0,2));\n\t   serie2.add(new DataSeriesItem(1,2));\n\t   serie2.add(new DataSeriesItem(2,3));\n\t   serie2.add(new DataSeriesItem(3,4));\n\t   serie2.add(new DataSeriesItem(4,5));\n\t   conf.addSeries(serie2);\n<\/pre>\n<p>With the PlotOptionsLine, I set the color of each line.<\/p>\n<p><span style=\"text-decoration: underline\"><em>PlotOptionsLine<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t   PlotOptionsLine serie1Opts = new PlotOptionsLine();\n\t   serie1Opts.setColor(SolidColor.BLUE);\n\t   serie1.setPlotOptions(serie1Opts);\n\n\t   PlotOptionsLine serie2Opts = new PlotOptionsLine();\n\t   serie2Opts.setColor(SolidColor.RED);\n\t   serie2.setPlotOptions(serie2Opts);\n<\/pre>\n<p>Here is the <code>getLineChart()<\/code> method.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Line Chart<\/em><\/span><\/p>\n<pre class=\"brush:java\">private Chart getLineChart()\n{\n\t   Chart chart = new Chart();\n\t   chart.setWidth(\"300px\");\n\t   chart.setHeight(\"300px\");\n\t   Configuration conf = chart.getConfiguration();\n\t   conf.getChart().setType(ChartType.LINE);\n\t   conf.setTitle(\"Line Chart\");\n\n\t   DataSeries serie1 = new DataSeries(\"SERIE 1\");\n\t   serie1.add(new DataSeriesItem(0,0));\n\t   serie1.add(new DataSeriesItem(1,1));\n\t   serie1.add(new DataSeriesItem(2,2));\n\t   serie1.add(new DataSeriesItem(3,3));\n\t   serie1.add(new DataSeriesItem(4,4));\n\t   conf.addSeries(serie1);\n\t   PlotOptionsLine serie1Opts = new PlotOptionsLine();\n\t   serie1Opts.setColor(SolidColor.BLUE);\n\t   serie1.setPlotOptions(serie1Opts);\n\n\t   DataSeries serie2 = new DataSeries(\"SERIE 2\");\n\t   serie2.add(new DataSeriesItem(0,2));\n\t   serie2.add(new DataSeriesItem(1,2));\n\t   serie2.add(new DataSeriesItem(2,3));\n\t   serie2.add(new DataSeriesItem(3,4));\n\t   serie2.add(new DataSeriesItem(4,5));\n\t   conf.addSeries(serie2);\n\t   PlotOptionsLine serie2Opts = new PlotOptionsLine();\n\t   serie2Opts.setColor(SolidColor.RED);\n\t   serie2.setPlotOptions(serie2Opts);\n\t   \n\t   return chart;\n}\n<\/pre>\n<h3>7.3 WaterFall Chart<\/h3>\n<p>The waterfall chart help to understand the cumulative effects of positive and negatives values.<\/p>\n<p><figure id=\"attachment_35101\" aria-describedby=\"caption-attachment-35101\" style=\"width: 317px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/05-Waterfall-Chart.png\" rel=\"attachment wp-att-35101\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/05-Waterfall-Chart.png\" alt=\"05 Waterfall Chart\" width=\"317\" height=\"305\" class=\"size-full wp-image-35101\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/05-Waterfall-Chart.png 317w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/05-Waterfall-Chart-300x289.png 300w\" sizes=\"(max-width: 317px) 100vw, 317px\" \/><\/a><figcaption id=\"caption-attachment-35101\" class=\"wp-caption-text\">05 Waterfall Chart<\/figcaption><\/figure><\/p>\n<p>Create the chart and assign a fixed size of 300&#215;300 pixels.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Create Chart<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tChart chart = new Chart(ChartType.WATERFALL);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\n<\/pre>\n<p>Create a Configuration object, set the title and get rid of the legend.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Configuration<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Waterfall Chart\");\n\tconf.getLegend().setEnabled(false);\n<\/pre>\n<p>Define the x axis of the chart and set the categories.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Xaxis<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tXAxis xaxis = new XAxis();\n\txaxis.setCategories(\"Initial value\", \"+90\", \"-70\" , \"Total\");\n\tconf.addxAxis(xaxis);\n<\/pre>\n<p>Define a y axis and set the title of the y axis.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Yaxis<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tYAxis yaxis = new YAxis();\n\tyaxis.setTitle(\"Accumulator\");\n\tconf.addyAxis(yaxis);\n<\/pre>\n<p>Define the colors, green to positive values and red to negative values.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Colors<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tfinal Color negative = SolidColor.RED;\n\tfinal Color positive = SolidColor.GREEN;\n<\/pre>\n<p>Create the data of the chart and add it to the configuration.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Data<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tDataSeries series = new DataSeries();\n\tDataSeriesItem start = new DataSeriesItem(\"Start\", 100);\n\tstart.setColor(positive);\n\tseries.add(start);\n\tDataSeriesItem a90 = new DataSeriesItem(\"+90\", +90);\n\ta90.setColor(positive);\n\tseries.add(a90);\n\tDataSeriesItem m70 = new DataSeriesItem(\"-70\", -70);\n\tm70.setColor(negative);\n\tseries.add(m70);\n\n\tWaterFallSum end = new WaterFallSum(\"Total\");\n\tend.setColor(positive);\n\tend.setIntermediate(false);\n\tseries.add(end);\n\tconf.addSeries(series);\t\n<\/pre>\n<p>The waterfall chart method.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Waterfall Chart<\/em><\/span><\/p>\n<pre class=\"brush:java\">private Chart getWaterfallChart()\n{\n\tChart chart = new Chart(ChartType.WATERFALL);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\n\n\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Waterfall Chart\");\n\tconf.getLegend().setEnabled(false);\n\n\tXAxis xaxis = new XAxis();\n\txaxis.setCategories(\"Initial value\", \"+90\", \"-70\" , \"Total\");\n\tconf.addxAxis(xaxis);\n\n\tYAxis yaxis = new YAxis();\n\tyaxis.setTitle(\"Accumulator\");\n\tconf.addyAxis(yaxis);\n\n\tfinal Color negative = SolidColor.RED;\n\tfinal Color positive = SolidColor.GREEN;\n\n\tDataSeries series = new DataSeries();\n\n\tDataSeriesItem start = new DataSeriesItem(\"Start\", 100);\n\tstart.setColor(positive);\n\tseries.add(start);\n\t\n\tDataSeriesItem a90 = new DataSeriesItem(\"+90\", +90);\n\ta90.setColor(positive);\n\tseries.add(a90);\n\t\n\tDataSeriesItem m70 = new DataSeriesItem(\"-70\", -70);\n\tm70.setColor(negative);\n\tseries.add(m70);\n\n\tWaterFallSum end = new WaterFallSum(\"Total\");\n\tend.setColor(positive);\n\tend.setIntermediate(false);\n\tseries.add(end);\n\n\tconf.addSeries(series);\t\t\n\treturn chart;\n}\n<\/pre>\n<h3>7.4 Pie Chart<\/h3>\n<p>A pie chart is used to view and compare numerical proportions.<\/p>\n<p><figure id=\"attachment_35103\" aria-describedby=\"caption-attachment-35103\" style=\"width: 317px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/06-Pie-Chart.png\" rel=\"attachment wp-att-35103\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/06-Pie-Chart.png\" alt=\"06 Pie Chart\" width=\"317\" height=\"305\" class=\"size-full wp-image-35103\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/06-Pie-Chart.png 317w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/06-Pie-Chart-300x289.png 300w\" sizes=\"(max-width: 317px) 100vw, 317px\" \/><\/a><figcaption id=\"caption-attachment-35103\" class=\"wp-caption-text\">06 Pie Chart<\/figcaption><\/figure><\/p>\n<p>Create the chart and set its size.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Create chart<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tChart chart = new Chart(ChartType.PIE);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\t\t\n<\/pre>\n<p>Create the configuration.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Configuration<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Pie Chart\");\n<\/pre>\n<p>Create the plot options, the size, the center and the inner size.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Plot options<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tPlotOptionsPie options = new PlotOptionsPie();\n\toptions.setInnerSize(\"50px\");\n\toptions.setSize(\"75%\");\n\toptions.setCenter(\"50%\", \"50%\");\n\tconf.setPlotOptions(options);\n<\/pre>\n<p>Create the data, one of 35%, one of 40% and one of 25% sliced to call the attention of the viewer.[ulp id=&#8217;YBvYYzEYBUrADqmI&#8217;]<\/p>\n<p><span style=\"text-decoration: underline\"><em>Data<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tDataSeries series = new DataSeries();\n\tseries.add(new DataSeriesItem(\"35%\", 35));\n\tseries.add(new DataSeriesItem(\"40%\", 40));\n\tDataSeriesItem s25 = new DataSeriesItem(\"25%\", 25);\n\ts25.setSliced(true);\n\tseries.add(s25);\n\tconf.addSeries(series);\t\t\n<\/pre>\n<p>The Pie chart method.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Pie Chart<\/em><\/span><\/p>\n<pre class=\"brush:java\">private Chart getPieChart()\n{\n\tChart chart = new Chart(ChartType.PIE);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\t\t\n\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Pie Chart\");\n\tPlotOptionsPie options = new PlotOptionsPie();\n\toptions.setInnerSize(\"50px\");\n\toptions.setSize(\"75%\");\n\toptions.setCenter(\"50%\", \"50%\");\n\tconf.setPlotOptions(options);\n\tDataSeries series = new DataSeries();\n\tseries.add(new DataSeriesItem(\"35%\", 35));\n\tseries.add(new DataSeriesItem(\"40%\", 40));\n\tDataSeriesItem s25 = new DataSeriesItem(\"25%\", 25);\n\ts25.setSliced(true);\n\tseries.add(s25);\n\tconf.addSeries(series);\t\t\n\t\n\treturn chart;\n}\n<\/pre>\n<h3>7.5 Funnel Chart<\/h3>\n<p>Is used to represent stages on sales process and potential revenue on each state.<\/p>\n<p><figure id=\"attachment_35105\" aria-describedby=\"caption-attachment-35105\" style=\"width: 341px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/07-Funnel-Chart.png\" rel=\"attachment wp-att-35105\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/07-Funnel-Chart.png\" alt=\"07 Funnel Chart\" width=\"341\" height=\"324\" class=\"size-full wp-image-35105\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/07-Funnel-Chart.png 341w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/07-Funnel-Chart-300x285.png 300w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/a><figcaption id=\"caption-attachment-35105\" class=\"wp-caption-text\">07 Funnel Chart<\/figcaption><\/figure><\/p>\n<p>Create the chart.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Create<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tChart chart = new Chart(ChartType.FUNNEL);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\t\t\n<\/pre>\n<p>Set the configuration.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Configuration<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Funnel Chart\");\n\tconf.getLegend().setEnabled(false);\n<\/pre>\n<p>Configure the plot options to set the neck of the funnel<\/p>\n<p><span style=\"text-decoration: underline\"><em>Plot options<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tPlotOptionsFunnel options = new PlotOptionsFunnel();\n\toptions.setNeckHeight(\"50%\");\n\toptions.setNeckWidth(\"50%\");\n\tconf.setPlotOptions(options);\n<\/pre>\n<p>Add the data.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Data<\/em><\/span><\/p>\n<pre class=\"brush:java\">\tDataSeries series = new DataSeries();\n\tseries.add(new DataSeriesItem(\"100\", 100));\n\tseries.add(new DataSeriesItem(\"50\", 50));\n\tseries.add(new DataSeriesItem(\"30\", 30));\n\tseries.add(new DataSeriesItem(\"20\", 20));\n\tconf.addSeries(series);\n\treturn chart;\n<\/pre>\n<p>The funnel chart method.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Funnel Chart<\/em><\/span><\/p>\n<pre class=\"brush:java\">private Chart getFunnelChart()\n{\n\tChart chart = new Chart(ChartType.FUNNEL);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\t\t\n\n\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Funnel Chart\");\n\tconf.getLegend().setEnabled(false);\n\n\tPlotOptionsFunnel options = new PlotOptionsFunnel();\n\toptions.setNeckHeight(\"50%\");\n\toptions.setNeckWidth(\"50%\");\n\tconf.setPlotOptions(options);\n\n\tDataSeries series = new DataSeries();\n\tseries.add(new DataSeriesItem(\"100\", 100));\n\tseries.add(new DataSeriesItem(\"50\", 50));\n\tseries.add(new DataSeriesItem(\"30\", 30));\n\tseries.add(new DataSeriesItem(\"20\", 20));\n\tconf.addSeries(series);\n\treturn chart;\n}\n<\/pre>\n<p>Create charts with Vaadin is very easy, all the chart share similar properties that make the process very intuitive you can resume the task to create charts into: create the chart, set the configuration, define the plot options and add the data. Some charts have more or less options but the process to create it is very similar.<\/p>\n<h2>8. The complete source code<\/h2>\n<p><span style=\"text-decoration: underline\"><em>VaadinchartsUI.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.example.vaadincharts;\n\nimport javax.servlet.annotation.WebServlet;\n\nimport com.vaadin.addon.charts.Chart;\nimport com.vaadin.addon.charts.model.ChartType;\nimport com.vaadin.addon.charts.model.Configuration;\nimport com.vaadin.addon.charts.model.DataSeries;\nimport com.vaadin.addon.charts.model.DataSeriesItem;\nimport com.vaadin.addon.charts.model.PlotOptionsFunnel;\nimport com.vaadin.addon.charts.model.PlotOptionsLine;\nimport com.vaadin.addon.charts.model.PlotOptionsPie;\nimport com.vaadin.addon.charts.model.WaterFallSum;\nimport com.vaadin.addon.charts.model.XAxis;\nimport com.vaadin.addon.charts.model.YAxis;\nimport com.vaadin.addon.charts.model.style.Color;\nimport com.vaadin.addon.charts.model.style.SolidColor;\nimport com.vaadin.annotations.Theme;\nimport com.vaadin.annotations.VaadinServletConfiguration;\nimport com.vaadin.server.VaadinRequest;\nimport com.vaadin.server.VaadinServlet;\nimport com.vaadin.ui.HorizontalLayout;\nimport com.vaadin.ui.UI;\nimport com.vaadin.ui.VerticalLayout;\n\n@SuppressWarnings(\"serial\")\n@Theme(\"vaadincharts\")\npublic class VaadinchartsUI extends UI {\n\n\t@WebServlet(value = \"\/*\", asyncSupported = true)\n\t@VaadinServletConfiguration(productionMode = false, ui = VaadinchartsUI.class, widgetset = \"com.example.vaadincharts.widgetset.VaadinchartsWidgetset\")\n\tpublic static class Servlet extends VaadinServlet {\n\t}\n\n\t@Override\n\tprotected void init(VaadinRequest request) {\n\t\t   final VerticalLayout layout = new VerticalLayout();\n\t\t   layout.setMargin(true);\n\t\t   setContent(layout);\n\t\t   \n\t\t   HorizontalLayout line01 = new HorizontalLayout();\n\t\t   HorizontalLayout line02 = new HorizontalLayout();\n\t\t   \n\t\t   line01.addComponent(getLineChart());\n\t\t   line01.addComponent(getWaterfallChart());\n\t\t   line02.addComponent(getPieChart());\n\t\t   line02.addComponent(getFunnelChart());\n\t\t   layout.addComponent(line01);\n\t\t   layout.addComponent(line02);\n\t}\n\nprivate Chart getLineChart()\n{\n\t   Chart chart = new Chart();\n\t   chart.setWidth(\"300px\");\n\t   chart.setHeight(\"300px\");\n\t   Configuration conf = chart.getConfiguration();\n\t   conf.getChart().setType(ChartType.LINE);\n\t   conf.setTitle(\"Line Chart\");\n\n\t   DataSeries serie1 = new DataSeries(\"SERIE 1\");\n\t   serie1.add(new DataSeriesItem(0,0));\n\t   serie1.add(new DataSeriesItem(1,1));\n\t   serie1.add(new DataSeriesItem(2,2));\n\t   serie1.add(new DataSeriesItem(3,3));\n\t   serie1.add(new DataSeriesItem(4,4));\n\t   conf.addSeries(serie1);\n\t   PlotOptionsLine serie1Opts = new PlotOptionsLine();\n\t   serie1Opts.setColor(SolidColor.BLUE);\n\t   serie1.setPlotOptions(serie1Opts);\n\n\t   DataSeries serie2 = new DataSeries(\"SERIE 2\");\n\t   serie2.add(new DataSeriesItem(0,2));\n\t   serie2.add(new DataSeriesItem(1,2));\n\t   serie2.add(new DataSeriesItem(2,3));\n\t   serie2.add(new DataSeriesItem(3,4));\n\t   serie2.add(new DataSeriesItem(4,5));\n\t   conf.addSeries(serie2);\n\t   PlotOptionsLine serie2Opts = new PlotOptionsLine();\n\t   serie2Opts.setColor(SolidColor.RED);\n\t   serie2.setPlotOptions(serie2Opts);\n\t   \n\t   return chart;\n}\n\nprivate Chart getWaterfallChart()\n{\n\tChart chart = new Chart(ChartType.WATERFALL);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\n\n\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Waterfall Chart\");\n\tconf.getLegend().setEnabled(false);\n\n\tXAxis xaxis = new XAxis();\n\txaxis.setCategories(\"Initial value\", \"+90\", \"-70\" , \"Total\");\n\tconf.addxAxis(xaxis);\n\n\tYAxis yaxis = new YAxis();\n\tyaxis.setTitle(\"Accumulator\");\n\tconf.addyAxis(yaxis);\n\tfinal Color negative = SolidColor.RED;\n\tfinal Color positive = SolidColor.GREEN;\n\n\tDataSeries series = new DataSeries();\n\n\tDataSeriesItem start = new DataSeriesItem(\"Start\", 100);\n\tstart.setColor(positive);\n\tseries.add(start);\n\t\n\tDataSeriesItem a90 = new DataSeriesItem(\"+90\", +90);\n\ta90.setColor(positive);\n\tseries.add(a90);\n\t\n\tDataSeriesItem m70 = new DataSeriesItem(\"-70\", -70);\n\tm70.setColor(negative);\n\tseries.add(m70);\n\n\tWaterFallSum end = new WaterFallSum(\"Total\");\n\tend.setColor(positive);\n\tend.setIntermediate(false);\n\tseries.add(end);\n\n\tconf.addSeries(series);\t\t\n\treturn chart;\n}\n\nprivate Chart getPieChart()\n{\n\tChart chart = new Chart(ChartType.PIE);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\t\t\n\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Pie Chart\");\n\tPlotOptionsPie options = new PlotOptionsPie();\n\toptions.setInnerSize(\"50px\");\n\toptions.setSize(\"75%\");\n\toptions.setCenter(\"50%\", \"50%\");\n\tconf.setPlotOptions(options);\n\tDataSeries series = new DataSeries();\n\tseries.add(new DataSeriesItem(\"35%\", 35));\n\tseries.add(new DataSeriesItem(\"40%\", 40));\n\tDataSeriesItem s25 = new DataSeriesItem(\"25%\", 25);\n\ts25.setSliced(true);\n\tseries.add(s25);\n\tconf.addSeries(series);\t\t\n\t\n\treturn chart;\n}\n\n\nprivate Chart getFunnelChart()\n{\n\tChart chart = new Chart(ChartType.FUNNEL);\n\tchart.setWidth(\"300px\");\n\tchart.setHeight(\"300px\");\t\t\n\n\tConfiguration conf = chart.getConfiguration();\n\tconf.setTitle(\"Funnel Chart\");\n\tconf.getLegend().setEnabled(false);\n\n\tPlotOptionsFunnel options = new PlotOptionsFunnel();\n\toptions.setNeckHeight(\"50%\");\n\toptions.setNeckWidth(\"50%\");\n\n\tconf.setPlotOptions(options);\n\n\tDataSeries series = new DataSeries();\n\tseries.add(new DataSeriesItem(\"100\", 100));\n\tseries.add(new DataSeriesItem(\"50\", 50));\n\tseries.add(new DataSeriesItem(\"30\", 30));\n\tseries.add(new DataSeriesItem(\"20\", 20));\n\tconf.addSeries(series);\n\treturn chart;\n}\n}\n<\/pre>\n<h2>9. Running the example<\/h2>\n<p>Right click on the project folder and choose Run as -&gt; Run on server choose Tomcat 8 server and hit finish.<\/p>\n<h2>10. Results<\/h2>\n<p>When you run the example if ecerything is ok, you should see the following charts on your browser<\/p>\n<p><figure id=\"attachment_35108\" aria-describedby=\"caption-attachment-35108\" style=\"width: 749px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/08-Vaadin-Charts.png\" rel=\"attachment wp-att-35108\"><img decoding=\"async\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/08-Vaadin-Charts.png\" alt=\"08 Vaadin Charts\" width=\"749\" height=\"781\" class=\"size-full wp-image-35108\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/08-Vaadin-Charts.png 749w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/08-Vaadin-Charts-288x300.png 288w\" sizes=\"(max-width: 749px) 100vw, 749px\" \/><\/a><figcaption id=\"caption-attachment-35108\" class=\"wp-caption-text\">08 Vaadin Charts<\/figcaption><\/figure><\/p>\n<h2>11. Download the Source Code<\/h2>\n<p>This was an example about Vaadin Charts.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the Eclipse project here: <strong><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/03\/VaadinCharts.zip\">VaadinCharts<\/a><\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Vaadin charts are beautiful eye candy charts to enrich your applications. Using Vaadin charts could make the difference when you need to sell the application to the end user. 1. The tools Java JDK 8 Latest Eclipse Mars Vaadin plugin for eclipse Vaadin charts 2. Introduction Vaadin charts offer more than twenty kinds of charts. &hellip;<\/p>\n","protected":false},"author":77,"featured_media":33079,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1358],"tags":[],"class_list":["post-35067","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vaadin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Vaadin Charts Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Vaadin charts are beautiful eye candy charts to enrich your applications. Using Vaadin charts could make the difference when you need to sell the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vaadin Charts Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Vaadin charts are beautiful eye candy charts to enrich your applications. Using Vaadin charts could make the difference when you need to sell the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-16T13:00:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-09T10:23:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jesus Boadas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@jboadas\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jesus Boadas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/\"},\"author\":{\"name\":\"Jesus Boadas\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7\"},\"headline\":\"Vaadin Charts Example\",\"datePublished\":\"2016-03-16T13:00:14+00:00\",\"dateModified\":\"2019-04-09T10:23:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/\"},\"wordCount\":885,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"articleSection\":[\"Vaadin\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/\",\"name\":\"Vaadin Charts Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"datePublished\":\"2016-03-16T13:00:14+00:00\",\"dateModified\":\"2019-04-09T10:23:08+00:00\",\"description\":\"Vaadin charts are beautiful eye candy charts to enrich your applications. Using Vaadin charts could make the difference when you need to sell the\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Vaadin\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/vaadin\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Vaadin Charts Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7\",\"name\":\"Jesus Boadas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg\",\"caption\":\"Jesus Boadas\"},\"description\":\"I'm a self taught programmer, I began programming back in 1991 using an IBM A10 mainframe with Pascal an Assembler IBM 360\/70 emulator and Turbo C on a X86 PC, since that I work for the banking industry with emerging technologies like Fox Pro, Visual Fox Pro, Visual Basic, Visual C++, Borland C++, lately I moved out to the Airline industry, leading designing and programming in-house web applications with Flex, Actionscript, PHP, Python and Rails and in the last 7 years I focused all my work in Java, working on Linux servers using GlassFish, TomCat, Apache and MySql.\",\"sameAs\":[\"http:\/\/www.javacodegeeks.com\/\",\"https:\/\/ve.linkedin.com\/in\/jesus-boadas\",\"https:\/\/x.com\/jboadas\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/jesus-boadas\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vaadin Charts Example - Java Code Geeks","description":"Vaadin charts are beautiful eye candy charts to enrich your applications. Using Vaadin charts could make the difference when you need to sell the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/","og_locale":"en_US","og_type":"article","og_title":"Vaadin Charts Example - Java Code Geeks","og_description":"Vaadin charts are beautiful eye candy charts to enrich your applications. Using Vaadin charts could make the difference when you need to sell the","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2016-03-16T13:00:14+00:00","article_modified_time":"2019-04-09T10:23:08+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","type":"image\/jpeg"}],"author":"Jesus Boadas","twitter_card":"summary_large_image","twitter_creator":"@jboadas","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Jesus Boadas","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/"},"author":{"name":"Jesus Boadas","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7"},"headline":"Vaadin Charts Example","datePublished":"2016-03-16T13:00:14+00:00","dateModified":"2019-04-09T10:23:08+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/"},"wordCount":885,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","articleSection":["Vaadin"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/","name":"Vaadin Charts Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","datePublished":"2016-03-16T13:00:14+00:00","dateModified":"2019-04-09T10:23:08+00:00","description":"Vaadin charts are beautiful eye candy charts to enrich your applications. Using Vaadin charts could make the difference when you need to sell the","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-charts-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/"},{"@type":"ListItem","position":4,"name":"Vaadin","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/vaadin\/"},{"@type":"ListItem","position":5,"name":"Vaadin Charts Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7","name":"Jesus Boadas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg","caption":"Jesus Boadas"},"description":"I'm a self taught programmer, I began programming back in 1991 using an IBM A10 mainframe with Pascal an Assembler IBM 360\/70 emulator and Turbo C on a X86 PC, since that I work for the banking industry with emerging technologies like Fox Pro, Visual Fox Pro, Visual Basic, Visual C++, Borland C++, lately I moved out to the Airline industry, leading designing and programming in-house web applications with Flex, Actionscript, PHP, Python and Rails and in the last 7 years I focused all my work in Java, working on Linux servers using GlassFish, TomCat, Apache and MySql.","sameAs":["http:\/\/www.javacodegeeks.com\/","https:\/\/ve.linkedin.com\/in\/jesus-boadas","https:\/\/x.com\/jboadas"],"url":"https:\/\/examples.javacodegeeks.com\/author\/jesus-boadas\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/35067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=35067"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/35067\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/33079"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=35067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=35067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=35067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}