charts
I'm building mixed chart type widget, One chart is line and the other is Bar both of them have data from different tables.. so how can I retrieve there data from each table ... and I'm not using apex chart so if there is any other solution please tell me........ I'm already using getFilter and trenvalue map function but it only retrieve data of one graph ty
15 Replies
Is the problem only happening when you filter?
If it’s only querying one table then I’d recommend just doing two separate queries with Trend::query. Then just map each one separately into different data objects.
Can you please show me an example because If I use two trend queries with the same filter attribute twice, it doesn't work
@awcodes
can you provide your widget code?
@awcodes
This is what i meant
and labels like this ? 'labels' => $submissionData->map(fn (TrendValue $value) => $value->date),
'labels' => $leadData->map(fn (TrendValue $value) => $value->date), @awcodes
you can only have one set of labels
then it shows data error
but since both would have the same dates you could use either one for the lables
undefined variable $data
in my head that should work
okay I'll try that thankyou so much @awcodes