Bubble chart
Integration with Highcharts
by Ravi A
HTML
<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<script src="https://cdn.flexmonster.com/lib/flexmonster.highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<div id="pivot-container"></div>
<br/>
<div id="highcharts-container"></div>
JavaScript
var pivot = new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: false,
report:ret_report(),
height: 300,
reportcomplete: function() {
pivot.off("reportcomplete");
bubbleChart();
}
});
function bubbleChart() {
pivot.highcharts.getData({
type: "bubble"
},
function(data) {
Highcharts.chart('highcharts-container', data);
},
function(data) {
Highcharts.chart('highcharts-container', data);
}
);
}
function ret_report(){
consile.log(JSON.parse(reppo))
return JSON.parse(reppo);
}
var reppo={"dataSource":{"type":"json","data":[{"City":{"type":"string"},"State":{"type":"string"},"Net Sales ($)":{"type":"number"},"Check Count":{"type":"number"},"Gross Sales ($)":{"type":"number"}},{"City":"Los Angeles","State":"CA","Net Sales ($)":9385906.82999723,"Check Count":585526,"Gross Sales ($)":10197739.2999964},{"City":"Seattle","State":"WA","Net Sales ($)":4727230.80000096,"Check Count":269100,"Gross Sales ($)":4968690.90000104},{"City":"San Jose","State":"CA","Net Sales ($)":3081722.80000033,"Check Count":159928,"Gross Sales ($)":3314735.67000041},{"City":"Irvine","State":"CA","Net Sales ($)":2685616.04000023,"Check Count":152345,"Gross Sales ($)":2937649.18000033},{"City":"El Segundo","State":"CA","Net Sales ($)":2301478.8400001,"Check Count":113571,"Gross Sales ($)":2510870.95000014},{"City":"Chicago","State":"IL","Net Sales ($)":2170079.47000014,"Check Count":138591,"Gross Sales ($)":2368057.83000019},{"City":"Pasadena","State":"CA","Net Sales ($)":2085208.59000008,"Check Count":114635,"Gross Sales ($)":2308253.65000013},{"City":"Long Beach","State":"CA","Net Sales ($)":1909546.36000004,"Check Count":100916,"Gross Sales ($)":2079549.91000007},{"City":"Santa Monica","State":"CA","Net Sales ($)":1771476.88000002,"Check Count":96467,"Gross Sales ($)":1921378.83000005},{"City":"Mountain View","State":"CA","Net Sales ($)":1613496.95999999,"Check...