Marker space issue
Marker space issue - Equal space required.
by ElanchezhiyanP
October 26, 2021
HTML
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<br /><!-- Just so that JSFiddle's Result label doesn't overlap the Chart -->
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
JavaScript
window.onload = function() {
var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: ""
},
axisX: {
title: "Dose",
titleFontColor: "black",
minimum: 4.5e-7,
maximum: 0.00000275,
titleFontSize: 12,
labelFontSize: 12,
tickLength: 15,
labelBackgroundColor: "white",
labelBorderColor: "white",
labelBorderThickness: 12,
logarithmic: true,
logarithmBase: 10,
labelFormatter: function(e) {
if (e.value == 0) {
return 0
} else {
return 10 + getSubscriptString(e.value);
}
}
},
data: [{ //"circle", "square", "cross", "none"
type: "scatter",
legendMarkerBorderColor: "#008000",
legendMarkerBorderThickness: 9,
legendMarkerType: "square",
lineColor: "#008000",
lineThickness: 1,
name: "DMSO",
toolTipContent: "<span>Dose</span>: {x} <span>OCR</span>: {y} <br>",
dataPoints: [
{
x: 0.0000024999999999999998,
y: 317.61132593563667,
compoungroup: "DMSO 2.50E-6 M",
markerColor: "#008000"
},
{
x: 0.000002,
y: 344.82759530263706,
compoungroup: "DMSO 2.00E-6 M",
markerColor: "#008000"
},
{
x: 0.0000015,
y: 336.6681872885366,
compoungroup: "DMSO 1.50E-6 M",
markerColor: "#008000"
},
{
x: 0.000001,
y: 296.4362716434692,
compoungroup: "DMSO 1.00E-6 M",
markerColor: "#008000"
},
{
x: 5e-7,
y: 219.07012152046852,
compoungroup: "DMSO 5.00E-7 M",
markerColor: "#008000"
}
]
},
{
type: "error",
name: "DMSO",
stemColor: "#008000",
toolTipContent: "<span>Error</span>:...