FusionCharts - Configuring the canvas border with grids_Forum post
Created using FusionCharts Suite XT - www.fusioncharts.com
by Vishalika
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- Configuring chart border using the following attributes:
# showBorder - Whether to show border around the chart
# borderColor - Color of the border (in hex)
# borderThickness - Thickness of border (in pixels)
# borderAlpha - Transparency of border (0-100 scale)
-->
<div id="chart-container">FusionCharts will render here</div>
CSS
body {
padding: 10px;
}
JavaScript
FusionCharts.ready(function () {
var revenueChart = new FusionCharts({
type: 'line',
renderAt: 'chart-container',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Monthly Revenue",
"subCaption": "Last year",
"xAxisName": "Month",
"yAxisName": "Amount (In USD)",
"numberPrefix": "$","numVDivLines":"12",
//Border Properties
"showvalues":"0", "divLineDashed": "0",
//Theme
"theme" : "fint"
},
"annotations": {
"groups": [
{
"id": "Grp1",
"showbelow": "1",
"items": [
{
"type": "rectangle",
"x": "$canvasstartX",
"y": "#canvasstartY",
"tox": "$canvasendX",
"toy": "$canvasEndY",
"radius": "10",
"color": "000000",
"fillalpha": "10",
"showborder": "1",
"fillcolor": "ffffff",
"bordercolor": "000000",
"borderthickness": "3"
}
]
}
]
},
"data": [
{
"label": "Jan",
"value": "420000"
},
{
"label": "Feb",
"value": "810000"
},
{
"label": "Mar",
"value": "720000"
}, {
"label": "Apr",
"value": "550000"
},
{
"label": "May",
"value": "910000"
},
{
"label": "Jun",
"value": "510000"
},
{
"label": "Jul",
...