Adding trendline in scatter chart
Created using FusionCharts Suite XT - www.fusioncharts.com
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- Scatter chart example -->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function () {
var tempVsSalesChart = new FusionCharts({
type: 'scatter',
renderAt: 'chart-container',
width: '600',
height: '350',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Sales of Beer & Ice-cream vs Temperature",
"subCaption": "Los Angeles Topanga",
"baseFont": "Helvetica Neue,Arial",
"captionFontSize": "14",
"subcaptionFontSize": "14",
"axis":"log",
"logBase":"1",
"subcaptionFontBold": "0",
"xAxisName": "Average Day Temperature",
"yAxisName": "Sales (In USD)",
"xAxisMinValue": "23",
"xAxisMaxValue": "95",
"yNumberPrefix": "$",
"xNumberSuffix": "° F",
"showBorder": "0",
"paletteColors": "#0075c2,#1aaf5d,#f2c500",
"bgcolor": "#ffffff",
"canvasBgColor": "#ffffff",
"showShadow": "0",
"showCanvasBorder": "0",
"usePlotGradientColor": "0",
"legendBorderAlpha": "0",
"legendShadow": "0",
"showAxisLines": "1",
"showAlternateHGridColor": "0",
"showAlternateVGridColor": "0",
"divlineThickness": "1",
"divLineIsDashed": "1",
"divLineDashLen": "1",
"divLineGapLen": "1",
"showValues": "0",
"use3dlighting": "0",
"showYAxisLine": "1",
"yAxisLineThickness": "1",
"yAxisLineColor": "#999999"
},
"dataset": [{
"seriesname": "Ice Cream",
...