influxdata / influxdata/influxdb
Colour by _colour doesn't actually work in scatter charts unless the data is ordered by _colour
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
1. Make a scatter chart of data where _value is plotted against _time
2. group() your data (which also muddles up order a bit)
3. Create a _colour field using map() so that _colour is a copy of _value
4. sort() your data by "_time"
5. select "fill by" _colour

__Expected behavior:__
You are of course expecting that it colours ("fills") the points by _colour (i.e. the _value).
like this

It doesn't. Not if you look closely at the bottom right point.
__Actual behavior:__
It sets the colour of the points according to a weird combination of _time or possibly the order that the points appear in the table.

You can prove that the colouring is related to the sort order by keeping **everything else the same** and just sorting by "_colour" instead of by "_time"
That gives the correct result.

The bug has maybe gone un-noticed because in many cases the order of the rows might be something like the fill by value
__Environment info:__
* InfluxDB cloud 2.0 interface.
* Creation of dashboard cell
* scatter plot
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in an InfluxDB Cloud dashboard cell using a scatter plot, following the listed group, map, sort, and fill-by steps. Trace how point colours are assigned when rows are sorted by _time versus _colour; done means fill-by _colour produces the same correct colours regardless of row order.
Written by the indexing model from the issue text.
Assessment
- Domain
- data-visualization, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100