opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.69k stars 895 forks source link

Default Metric for Visualisations #3279

Open jgough opened 1 year ago

jgough commented 1 year ago

The default metric when creating a visualisation is always Count, which works well in most cases. However there are also many other cases where Count is not a preferable default, for example when graphing financial data where sum:sales would be a much more preferable metric to plot.

I'd like the the ability to override the default metric of Count and set my own default. This could be set when defining an index pattern, or could be set in Stack Management => Advanced settings. Bonus points if it works as the default in Timeline visualisations too.

This would make it easier for new users who are not as familiar with how the underlying data is set up.

joshuarrrr commented 1 year ago

@jgough I really like this idea. As part of #2840 , one of my big goals is more sensible defaults. I also want to provide more opportunity for admins and users to set visualization defaults, too. I think this feature may be fairly straightforward if we piggy-back on the existing functionality for specifying the default timestamp field for index patterns.