Hey @simenn@Hugo_Hahn! I've gotten this working, actual implementation may vary depending on how the data is formatted and how many data sets you are plotting.
As an overview, it looks like customdata is an array of data where each element is assigned to the corresponding datum (ie: the first element in the customdata array is assigned to the first datum in the set). Knowing this, you can assign an array with n elements to each dataset that can be accessed in the hovertemplate. Here, I've assigned each datum an object (which we can key into inside the hovertemplate), and a dynamic value assigned by a component in the app.
Thank you for your reply and effort to guide us on this.
However, i am still struggling a bit to make this work - i think i understand your solution and explanation - however for my use case it seems a bit more complicated as i dont seem to be able to access the queries in the same way as you access the "hardcoded" values.
Hey @simenn! I'm referencing dynamic values in my example as well. Going to need a bit more information on your specific use case to understand what's happening here.
Can you share what the hover tooltip looks like with this code?
Can you share what TableQuery.data.data looks like?
Also is seems that you are passing the 'pricingTypeto the first data point, andprojectId` to the second. Are those the values that you want passed to those specific points?
{
"merchant_services_view.product": "MasterCard",
"merchant_services_view.settlementCountry": "Norway",
"merchant_services_view.pricingType": "Current",
"merchant_services_view.companyName": "i can not display this",
"merchant_services_view.projectId": 3,
}
in the tablequery this is the data structure
For the data points, that was actually just a typo, but it made no difference in outcome correcting it.
I just really struggle wrapping my head around this, since the data structure obviously is accepted by customdata since it works with one dataset, it shouldnt be a problem adapting it to several datasets with your method and my data structure