Home Forums StockChart Support Scale ratio in canvasjs for both axes Reply To: Scale ratio in canvasjs for both axes

#36618

@mustadirmahmood,

The dataPoints in a chart are plotted based on pixel coordinates. You can convert millimeter to pixel value by multiplying it by 3.7795. Please find the code snippet below.

function convertMillimeterToPixel(mm) {
	return (mm * 3.7795);
}

Please take a look at this JSFiddle for an example on setting chart width & height in millimeters. You can use legendText to display the scale-ratio.


Thangaraj Raman
Team CanvasJS