influxdata / influxdata/influxdb

Colour by _colour doesn't actually work in scatter charts unless the data is ordered by _colour

Open
#22,720 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/ui area/vis wontfix
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
![image](https://user-images.githubusercontent.com/69196723/138227668-cb7b234f-76c9-482f-92c5-23fefff7bc3e.png)

__Expected behavior:__
You are of course expecting that it colours ("fills") the points by _colour (i.e. the _value).
like this
![image](https://user-images.githubusercontent.com/69196723/138227855-38b6f241-536c-4555-bb04-dae8ea60036b.png)

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.
![image](https://user-images.githubusercontent.com/69196723/138228022-673e76f8-8fcd-43f2-8963-5eea89f708d8.png)

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.
![image](https://user-images.githubusercontent.com/69196723/138227855-38b6f241-536c-4555-bb04-dae8ea60036b.png)

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.