Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot select certain columns for visualizations #14153

Closed
chnn opened this issue Jun 18, 2019 · 0 comments · Fixed by #14188
Closed

Cannot select certain columns for visualizations #14153

chnn opened this issue Jun 18, 2019 · 0 comments · Fixed by #14188
Assignees

Comments

@chnn
Copy link
Contributor

chnn commented Jun 18, 2019

Use the following Flux query:

import "csv"

data = "#group,false,false,true,true,false,true,false,false
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,double,double
#default,_result,,,,,,,
,result,table,_start,_stop,_time,_measurement,y,x
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:27Z,arbitrary,5,4
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:28Z,arbitrary,10,4
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:29Z,arbitrary,16,12
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:30Z,arbitrary,24,18
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:31Z,arbitrary,17,19
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:32Z,arbitrary,14,27
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:33Z,arbitrary,17,31
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:34Z,arbitrary,18,31
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:35Z,arbitrary,14,27
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:36Z,arbitrary,19,22
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:37Z,arbitrary,23,19
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:38Z,arbitrary,22,26
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:39Z,arbitrary,29,31
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:40Z,arbitrary,29,38
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:41Z,arbitrary,26,39
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:42Z,arbitrary,30,49
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:43Z,arbitrary,32,50
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:44Z,arbitrary,32,60
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:45Z,arbitrary,31,62
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:46Z,arbitrary,38,63
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:47Z,arbitrary,46,69
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:48Z,arbitrary,48,77
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:49Z,arbitrary,48,74
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:50Z,arbitrary,55,72
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:51Z,arbitrary,65,79
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:52Z,arbitrary,66,85
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:53Z,arbitrary,75,83
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:54Z,arbitrary,76,82
,,0,2019-06-17T19:08:20.315404Z,2019-06-18T19:08:20.315404Z,2019-06-17T22:03:55Z,arbitrary,80,82"


csv.from(csv: data)

With the graph, heatmap, and scatterplot visualization types, you should be able to select x or y from the "Y Column" dropdown. Currently you cannot:

bug

There is a related bug. Add the following to the end of the query:

  |> map(fn: (r) => ({
      _value_x: r.x,
      _value_y: r.y
    })
  )

Now switch to the heatmap and attempt to select _value_x and _value_y columns in the visualization options. This yields the following crash:

Uncaught TypeError: Cannot read property '0' of undefined
    at qi (heatmap.ts:102)
    at Wi (heatmap.ts:19)
    at memoize-one.esm.js:30
    at t.getTable (PlotEnv.ts:247)
    at PlotEnv.ts:364
    at Array.reduce (<anonymous>)
    at t.getColumnTypeForAesthetics (PlotEnv.ts:362)
    at t.get [as yTicks] (PlotEnv.ts:107)
    at t.get [as margins] (PlotEnv.ts:58)
    at Ao (SizedPlot.tsx:31)

Thanks to @sanderson for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant