EnVisageOnline/Main/Source/EnVisage/Scripts/Dashboard/pv.chart.bubble.js

68 lines
1.7 KiB
JavaScript

AmCharts.makeChart("chartBubble1", {
"balloon": {
"fixedPosition": true
},
"gradientRatio": [-0.4, -0.4, -0.4, -0.4, -0.4, -0.4, 0, 0.1, 0.2, 0.1, 0, -0.2, -0.5],
"chartScrollbar": {},
"chartCursor": {},
"marginLeft": 46,
"fontFamily": "Open Sans",
"marginRight": 0,
"marginTop": 17,
"marginBottom": 35,
"export": {
"enabled": true
},
"pathToImages": "//cdn.amcharts.com/lib/3/images/", // required for grips
"startDuration": 0,
"type": "xy",
"theme": "light",
"titles": [{
"id": "Title-1",
"size": 15,
"text": "Projects by Priority",
"color": "#555"
}],
"dataDateFormat": "MM/DD/YYYY",
"valueAxes": [{
"position": "bottom",
"axisAlpha": 0,
"type": "date",
"minimumDate": new Date(2016, 1, 1),
"maximumDate": new Date(2020, 12, 31)
}, {
"minMaxMultiplier": 1.2,
"integersOnly": false,
"maximum": 26,
"minimum": -1,
"reversed": true,
"showFirstLabel": false,
"showLastLabel": false,
"axisAlpha": 0,
"position": "left"
}],
"graphs": [{
"bullet": "bubble",
"lineAlpha": 0,
"valueField": "quantity",
"xField": "middleDate",
"yField": "projectPriority",
"colorField": "projectColor",
"fillAlphas": 0,
"bulletBorderAlpha": 0.01,
"bulletBorderThickness": 0.1,
"maxBulletSize": 80,
"minBulletSize": 10,
"showHandOnHover": true,
"balloonFunction": function (graphDataItem, graph) {
var dataItem = graphDataItem.dataContext;
var balloonText =
dataItem.projectName +
"<br/>Quantity: " + dataItem.quantity.formatNumber(false) +
"<br/>Cost: " + "$" + dataItem.cost.formatNumber() +
"<br/>Priority: " + dataItem.projectPriority.formatNumber();
return balloonText;
}
}]
});