You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a clear and concise description of what you want to happen.
We improved the functionality of the tooltip over time, including most recently through PR #1286. But the configuration process and many options that exist is getting complicated.
This issue is intended to capture thoughts on how we can simplify the configuration process so that future PRISM configs are straightforward to implement.
My suggestion is to replace feature_info_props with tooltip and to move all information that is displayed in the tooltip here. Please have a look at the example below including the comments
"tooltip": {
"primary_field": {
"title": "layer_title",
// by default the title is the layer's title but it can be modified here. this should be an optional config parameter and layer_title is reserved text.
"source": "layer_value",
// for the primary field, options are layer_value or legend_label. This allows us to use numeric values or strings which is useful for either continuous or categorical variables
},
"additional_fields": {
"title": "Population",
"source": "pop",
// an additional field can be configured from the data source of the layer. In this example, there's a field called 'pop' within this layer's json data source
"type": "number"
},
"additional_fields": {
"title": "Risk index",
"source": "mdr_index.multi_dim_risk_index",
// in this example, the source is in another layer called mdr_index, and a field in that layer called multi_dim_risk_index. this is a new feature request
"type": "number"
},
"displayAdminLevel": false
// feature request to optionally show/hide the admin level in the tooltip
}
Thanks @wadhwamatic for putting this together! A couple thoughts:
It'd be great to layout how we'd support tables and charts in this configuration as well. Is it clear to you when we display tables and charts within the current logic?
I see special handling for "Population in phase 1" tables in the ToolTip code
I see a PopupChartsList and PopupAnalysisCharts that are displayed when the adminLevel is not defined but it's not clear to me in the code when these should show
We currently call the Tooltip a "Popup" in our React code, I think this is a good opportunity to update it to "Tooltip" as well.
Last note, I think we should make this slight update to what you had before that treats "additional_fields" as an array rather than multiple fields with the same key:
"tooltip": {
"primary_field": {
"title": "layer_title",
// by default the title is the layer's title but it can be modified here. this should be an optional config parameter and layer_title is reserved text.
"source": "layer_value",
// for the primary field, options are layer_value or legend_label. This allows us to use numeric values or strings which is useful for either continuous or categorical variables
},
"additional_fields": [
{
"title": "Population",
"source": "pop",
// an additional field can be configured from the data source of the layer. In this example, there's a field called 'pop' within this layer's json data source
"type": "number"
},
{
"title": "Risk index",
"source": "mdr_index.multi_dim_risk_index",
// in this example, the source is in another layer called mdr_index, and a field in that layer called multi_dim_risk_index. this is a new feature request
"type": "number"
},
],
"displayAdminLevel": false // feature request to optionally show/hide the admin level in the tooltip
}
Thanks @gislawill for the feedback and additional thinking on this.
Very good points about the special handling of population phase, PopupChartsList and PopupAnalysisCharts. I don't know the details of how this was implemented, but we should make this more clear within work for this issue, and consider how we could optionally use tables / charts in this config process but keeping in mind the goal of simplifying things. @ericboucher - thanks for input on this.
Yes, agreed, let's make our terms consistent. We might want to specify this as the admin area tooltip, since we also have a tooltip on the timeline.
Also agreed to make additional_fields an array - good catch.
Provide a clear and concise description of what you want to happen.
We improved the functionality of the tooltip over time, including most recently through PR #1286. But the configuration process and many options that exist is getting complicated.
This issue is intended to capture thoughts on how we can simplify the configuration process so that future PRISM configs are straightforward to implement.
My suggestion is to replace feature_info_props with tooltip and to move all information that is displayed in the tooltip here. Please have a look at the example below including the comments
@ericboucher and @gislawill - please add your inputs here as well.
Is there anything else you can add about the proposal? You might want to link to related issues here, if you haven't already.
No response
The text was updated successfully, but these errors were encountered: