rawgraphs / rawgraphs-app

A web interface to create custom vector-based visualizations on top of RAWGraphs core
https://rawgraphs.io
Apache License 2.0
8.68k stars 1.84k forks source link

Accept strings for X axis of Line chart #244

Closed knutwannheden closed 9 months ago

knutwannheden commented 3 years ago

In which part of the interface would this feature applies?

[ ] 1. Load your data [ ] 2. Choose a chart [x] 3. Mapping [ ] 4. Customize [ ] 5. Export

Is your feature request related to a problem? Please describe. In my data set I have two text columns and one number column. I would like to map one of the text columns to the X axis and the number column to the Y axis, while the second text column identifies the data points for one particular line.

Describe the solution you'd like When selecting a text column as the X axis I would expect there to be evenly spaced labels for the distinct values in the text column (ordered alphanumerically).

Describe alternatives you've considered

Additional context This is for instance something that works out of the box in Falcon SQL Client. Here is what it would look like there for example:

image

mikima commented 3 years ago

Hi @knutwannheden in line charts we forced data type to be number or date, since the ordering of strings would influence a lot the reading. If the strings represent dates, I suggest you to convert them in an ISO format so they can be parsed by RAWGraphs

knutwannheden commented 3 years ago

OK. In Falcon SQL Client (and thus Plotly I suppose), the ordering is derived from the ordering given by the data.

In the example graph I have provided, I could of course assign a number to the values on the X axis (I would have to assign consecutive numbers to get the ticks evenly spaced), but I would really prefer to be able to have text values, since the numbers wouldn't really mean anything to the reader.