Java Wicket Chart Usage

In order to use the Shield UI Chart's wrapper code in a Java Wicket application, you need to include the references to the CSS and JavaScript resources in the HEAD section of your webpage, and add a DIV element for each chart you need to include on your page:

<!DOCTYPE html>
<title>Shield Chart</title>
<meta charset="utf-8" />

<link rel="stylesheet" type="text/css" href="css/light/all.min.css" />
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/shieldui-all.min.js"></script>

    <div wicket:id="mainchart" style="width:600px; height:400px;"></div>

Then initialize your chart in the Java code for your Wicket page:

final Chart chart = new Chart("chart");

// set the chart type

// add some data
ChartOptions.DataSeriesItem dsi = new ChartOptions.DataSeriesItem();
dsi.setData(20, 15, 45, 10, 5, 5);