allow click legend after update chart
This commit is contained in:
@@ -88,9 +88,9 @@
|
|||||||
mounted: function (chartContext, config) {
|
mounted: function (chartContext, config) {
|
||||||
renderLegend(chartContext);
|
renderLegend(chartContext);
|
||||||
},
|
},
|
||||||
updated: function (chartContext, config) {
|
{{-- updated: function (chartContext, config) {
|
||||||
renderLegend(chartContext);
|
renderLegend(chartContext);
|
||||||
}
|
} --}}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.data.tooltip = {
|
this.data.tooltip = {
|
||||||
@@ -117,6 +117,7 @@
|
|||||||
|
|
||||||
// generate custom legend view
|
// generate custom legend view
|
||||||
function renderLegend(chartContext) {
|
function renderLegend(chartContext) {
|
||||||
|
console.log(chartContext)
|
||||||
var legendContainer = document.querySelector('#chart-legend-{{ $name }}');
|
var legendContainer = document.querySelector('#chart-legend-{{ $name }}');
|
||||||
|
|
||||||
if (!legendContainer) return;
|
if (!legendContainer) return;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ new class extends Component {
|
|||||||
$dailyChangeQuery = DailyChange::query();
|
$dailyChangeQuery = DailyChange::query();
|
||||||
|
|
||||||
if (isset($this->portfolio)) {
|
if (isset($this->portfolio)) {
|
||||||
|
|
||||||
$dailyChangeQuery->portfolio($this->portfolio->id);
|
$dailyChangeQuery->portfolio($this->portfolio->id);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user