fix:order of data series
This commit is contained in:
@@ -101,7 +101,6 @@
|
||||
enabled: true,
|
||||
y: {
|
||||
formatter: (value, { series, seriesIndex, dataPointIndex, w }) => {
|
||||
|
||||
const firstDataPoint = this.data.series[seriesIndex].data[0][1]
|
||||
const percentageChange = ((value - firstDataPoint) / firstDataPoint) * 100;
|
||||
return `$${parseFloat(value.toFixed(2))} (${percentageChange.toFixed(2)}%)`;
|
||||
@@ -121,7 +120,7 @@
|
||||
|
||||
// generate custom legend view
|
||||
function renderLegend(chartContext) {
|
||||
console.log(chartContext)
|
||||
|
||||
var legendContainer = document.querySelector('#chart-legend-{{ $name }}');
|
||||
|
||||
if (!legendContainer) return;
|
||||
|
||||
@@ -51,8 +51,7 @@ new class extends Component {
|
||||
SUM(total_dividends_earned) as total_dividends_earned
|
||||
*/
|
||||
')
|
||||
->groupBy('date')
|
||||
->orderByDesc('date');
|
||||
->groupBy('date');
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user