Set color on existing series
See original GitHub issueSomeone asked something similar in #182 but it looks like the implementation changed such that the only way is to delete and add the series. I can’t really do this in my application because I’m streaming live data. I was hoping to do something like:
this.graph.series[index].stroke = 'green'
Where of course this.graph
is the reference to uPlot. This results in the error s.stroke is not a function
. It’s a little confusing to me because previously I was saving and restoring colors to my color list for use in future graph items.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Vary the colors of same-series data markers in a chart
Set varying colors of data markers (bars, columns, lines, pie or doughnut slices, dots, and other shapes) automatically in an Office chart.
Read more >How to plot a pd.Series and use the color for each point ...
I have a pd.Series called data that I would like to plot, and I have another series with the same index as data...
Read more >Apply colors to data points or series using color rules
Auto Color Rules automatically come up with a series of colors applied based on measure values. You can change their settings to determine...
Read more >MATLAB colororder - MathWorks
The color order controls the set of colors that MATLAB uses for plotting multiple data series within an axes. Graphics objects such as...
Read more >Set Pandas dataframe background Color and font color in ...
We can modify DataFrame using a user-defined function: With the help of this function, we can customizing the font color of positive data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
just keep the data externally in
this.data
and re-provide it when re-initializing the plot, right?I appreciate the help. Wouldn’t
u.destroy()
remove the series and the stored data? I mean you could do this at initialization like you said but you’d lose anything currently on the plot correct? Or is there another way to rebuilt the plot while keeping the data and just redrawing / layout?