So I am currently making a line chart that it's date will be called from my db. The Problem is that the DAYS are kept repeated like this.
I want to keep the days single only like this rather than doubled. : 11Feb2018 12Feb2018 13Feb2018 14Feb2018
Javascript(Views):
dataPoints: [
<?php foreach ($result1 as $row) { ?>
<?php echo'{x:new Date('.$row->data1.','.$row->data2.','.$row->data3.'),
y:'.$row->data4.'},'?>
<?php } ?>
]
Controller:
$data['result1'] = $this->madminpathologyweekly->get_result1()->result();
$this->load->view('vadminpathologyweekly',$data);
Model:
public function get_result1() {
$sql = "SELECT year as data1,month_of_the_year - 1 as data2, day_of_the_month as data3,";
$sql .= "COUNT(test_id) as data4 from TBLSUBMITTEDREQUEST group by year ,month_of_the_year, day_of_the_month";
$query = $this->db->query($sql);
return $query;
}
So I did a deeper research and I found out that I missed an interval type: and interval: in axis x like this.
axisX: {
valueFormatString: "DD MMMM YYYY",
intervalType: "day",
interval: 1,
},
Cheers guys. I've already solved it. Thanks for your time.