BellaDati charts.js library allows you to render BellaDati JSON charts data directly on your web page.
You can find this example on GitHub https://github.com/BellaDati/belladati-charts/tree/master/example
Prerequisites
BellaDati-charts.js requires following javascript libraries:
Step-by-step
Link required libraries in your page
<head> ... <script src="http://code.jquery.com/jquery-1.7.1.js"></script> <script src="http://rawgit.com/DmitryBaranovskiy/raphael/v2.1.4/raphael-min.js"></script> <script src="http://rawgit.com/BellaDati/belladati-charts/master/belladati-charts-min.js"></script> ... <head>
- Get or define the charts data in JSON format
Define the container, where the chart should be rendered
<div id="chart" style="width: 500px; height: 400px; border: 1px solid silver"></div>
Render the chart by executing Charts.createAndRender("container_id", "json_chart_data");
var $container = $("#chart"); var chart = Charts.createAndRender("chart", getChartData()); chart.resize($container.width(), $container.height());
Example
And here it is all-together. Click to download a sample HTML file.
Overview
Content Tools