JavaScript
var colorsArray = [
'#B3E6FF',
'#B8EBF5',
'#E46026',
'#C7488D',
'#FFB400'
];
CanvasJS.addColorSet('ColorsArray', this.colorsArray);
var chart = new CanvasJS.Chart('chartContainer', {
colorSet: 'ColorsArray',
animationEnabled: true,
axisY: {
tickColor: '#EDEBE9',
tickLength: 5,
tickThickness: 2,
gridColor: '#EDEBE9',
gridThickness: 2,
// title: 'Units Sold',
valueFormatString: '#0,,.',
suffix: 'mm',
// stripLines: [{
// value: 3366500,
// label: 'Average'
// }]
},
axisX: {
tickColor: '#EDEBE9',
tickLength: 5,
tickThickness: 2,
gridColor: '#EDEBE9',
gridThickness: 2,
},
options: {
responsive: true,
maintainAspectRatio: true,
},
data: [{
/* color: '#B3E6FF', */
yValueFormatString: '#,###',
xValueFormatString: 'YYYY',
toolTipContent: '123 Main Street - ${y} on {x} - Arms Length Sale - Source: SOURCE',
type: 'line',
markerSize: 0,
dataPoints: [
{ x: new Date(2010, 0), y: 7289000 },
{ x: new Date(2011, 0), y: 4830000 },
{ x: new Date(2012, 0), y: 2009000 },
{ x: new Date(2013, 0), y: 2840000 },
{ x: new Date(2014, 0), y: 2396000 },
{ x: new Date(2015, 0), y: 1613000 },
{ x: new Date(2016, 0), y: 2821000 },
{ x: new Date(2017, 0), y: 2000000 }
]
},
{
/* color: '#B8EBF5', */
yValueFormatString: '#,###',
xValueFormatString: 'YYYY',
toolTipContent: '234 Main Street - ${y} on {x} - Arms Length Sale - Source: SOURCE',
type: 'line',
dataPoints: [
{ x: new Date(2012, 0), y: 2509000 },
{ x: new Date(2013, 0), y: 2584000 },
{ x: new Date(2014, 0), y: 2396000 },
{ x: new Date(2015, 0), y:...