livewire-charts
livewire-charts copied to clipboard
line chart is not working
I am using this chart column chart is working but the line chart is not working here is my code
$this->lineChartModel = (new LineChartModel())->setTitle('quotations each day')
->addPoint('18-10-2020', 200)->addPoint('19-10-2020', 100)->addPoint('20-10-2020', 300)
->addPoint('21-10-2020', 200)->addPoint('22-10-2020', 230) ->addPoint('23-10-2020', 280)
->addPoint('24-10-2020', 210);
return [
'lineChartModel' => $this->lineChartModel
];
the line chart display but it is not showing the data it shows the default x and y-axis without value.
If you are showing two charts on the same page, you might encounter this if you don't set a key
on the Livewire component tag.
e.g.
<livewire:livewire-column-chart
key="one"
:column-chart-model="$columnChartModel"
/>
<livewire:livewire-line-chart
key="two"
:line-chart-model="$lineChartModel"
/>
Hello, can I ask how to Implement the LivewireLineChart on Laravel eloquent collection method ?