perses icon indicating copy to clipboard operation
perses copied to clipboard

Allow set of a color when you have only one timeseries for query

Open Nexucis opened this issue 3 years ago • 2 comments

In the LineChart, some of our users would like to be able to set a color only if the query you can configure returned a single timeseries.

In case there is more than one, then the color set in the query is ignored by the panel.

Nexucis avatar Sep 22 '22 09:09 Nexucis

I’ve been thinking about this more as I’m reading comments on #1031

It might actually be pretty easy to do, the spec for palette could potentially be:

kind: ‘Single’
color: string 
fallback?: ‘Auto’ | ‘Categorical’ // palette kinds 

Or maybe a ‘mode’ instead and then ‘fallback_palette’ 🤔

Regardless, we could make it default to what is proposed in this Issue, but give optional properties to customize fallback behavior further

sjcobb avatar Mar 25 '23 03:03 sjcobb

Thinking of changing our default back to ‘auto’ so we have consistent colors for same series names across panels again and adding visual.palette.singleSeriesColor as an optional property. Then add a color picker control where the color selected kicks in when one series returned, when more than one, just use visual.palette.mode as fallback

sjcobb avatar Dec 23 '23 03:12 sjcobb