canvasjs-dashboard-samples/assets/web-analytics/real-time.js
// chart properties cutomized further based on screen width	

chart properties cutomized further based on screen width
chart properties cutomized further based on screen width
function chartPropertiesCustomization(chart) {
		if ($(window).outerWidth() >= 1920) {			
			chart.options.legend.fontSize = 14;
			chart.options.legend.horizontalAlign = "left";
			chart.options.legend.verticalAlign = "center";
			chart.options.legend.maxWidth = null;
		}else if ($(window).outerWidth() < 1920 && $(window).outerWidth() >= 1200) {
			chart.options.legend.fontSize = 14;
			chart.options.legend.horizontalAlign = "left";
			chart.options.legend.verticalAlign = "center";
			chart.options.legend.maxWidth = 140;
		} else if ($(window).outerWidth() < 1200 && $(window).outerWidth() >= 992) {
			chart.options.legend.fontSize = 12;
			chart.options.legend.horizontalAlign = "center";
			chart.options.legend.verticalAlign = "top";
			chart.options.legend.maxWidth = null;
		} else if ($(window).outerWidth() < 992) {
			chart.options.legend.fontSize = 14;
			chart.options.legend.horizontalAlign = "center";
			chart.options.legend.verticalAlign = "bottom";
			chart.options.legend.maxWidth = null;
		}
		chart.render();
	}
function chartPropertiesCustomization ( chart ) { if ( $ ( window ) . outerWidth ( ) >= 1920 ) { chart . options . legend . fontSize = 14 ; chart . options . legend . horizontalAlign = "left" ; chart . options . legend . verticalAlign = "center" ; chart . options . legend . maxWidth = null ; } else if ( $ ( window ) . outerWidth ( ) < 1920 && $ ( window ) . outerWidth ( ) >= 1200 ) { chart . options . legend . fontSize = 14 ; chart . options . legend . horizontalAlign = "left" ; chart . options . legend . verticalAlign = "center" ; chart . options . legend . maxWidth = 140 ; } else if ( $ ( window ) . outerWidth ( ) < 1200 && $ ( window ) . outerWidth ( ) >= 992 ) { chart . options . legend . fontSize = 12 ; chart . options . legend . horizontalAlign = "center" ; chart . options . legend . verticalAlign = "top" ; chart . options . legend . maxWidth = null ; } else if ( $ ( window ) . outerWidth ( ) < 992 ) { chart . options . legend . fontSize = 14 ; chart . options . legend . horizontalAlign = "center" ; chart . options . legend . verticalAlign = "bottom" ; chart . options . legend . maxWidth = null ; } chart . render ( ) ; }
chart properties cutomized further based on screen width
chart properties cutomized further based on screen width