Need to show data points with the separate date column of same date

Viewed 37

enter image description here

In above picture there are 2 data points on 150 (y-axis) and date is same, issue is that 2 data points are overlapping on each other, I need to show them separately, So both points which are overlapping with 2 date x-axis point instead of 1, please suggest any solution.

Here is the code:

chartBP = new AmCharts.AmSerialChart();
chartBP.path = "../../js/amcharts/";
chartBP.dataDateFormat = "YYYY-MM-DD";
chartBP.dataProvider = bp_array;
chartBP.categoryField = "created_at";

var bpDateAxix = chartBP.categoryAxis;
bpDateAxix.parseDates = true;
bpDateAxix.minorGridEnabled = true;
bpDateAxix.axisColor = "#FF7418";
bpDateAxix.twoLineMode = true;

var bpValueAxis = new AmCharts.ValueAxis();
bpValueAxis.gridAlpha = 0.15;
chartBP.addValueAxis(bpValueAxis);
bpValueAxis.axisColor = "#FF6600";
bpValueAxis.title = "Blood Pressure ("+uom+")";
bpValueAxis.minimum = 0;

var sysGraph = new AmCharts.AmGraph();
sysGraph.valueAxis = bpValueAxis;
sysGraph.valueField = "systolic";
sysGraph.balloonText = "SYS:[[systolic]] "+uom+"<br><p style='font-size:9px;max-width:300px; 
word-wrap: break-word;'>[[alert_text]]</p>";
sysGraph.bullet = "round";
sysGraph.colorField = "bullet_color";
sysGraph.lineColor = "#808080";
chartBP.addGraph(sysGraph);

var diaGraph = new AmCharts.AmGraph();
diaGraph.valueAxis = bpValueAxis;
diaGraph.valueField = "diastolic";
diaGraph.balloonText = "DIA:[[diastolic]] "+uom+"<br><p style='font-size:9px;max-width:300px; 
word-wrap: break-word;'>[[alert_text]]</p>";
diaGraph.colorField = "bullet_color";
diaGraph.lineColor = "#808080";
diaGraph.bullet = "square";
chartBP.addGraph(diaGraph);

var chartScrollbar = new AmCharts.ChartScrollbar();
chartScrollbar.scrollbarHeight = 20;
chartScrollbar.color = "#000000";
chartScrollbar.dragIcon = "/amcharts/images/dragIconRoundSmall.svg";
chartScrollbar.dragIconHeight = 22;
chartScrollbar.dragIconWidth = 22;
chartBP.addChartScrollbar(chartScrollbar);

chartBP.write(elementId);

AmCharts.checkEmptyData(chartBP);
0 Answers
Related