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

Error Bars from CSV data parsing error #8438

Closed
roatesTag opened this Issue Jun 7, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@roatesTag

roatesTag commented Jun 7, 2018

Expected behaviour

My CSV is formatted as follows:

X-axis Label,1stDataSet,CILines,2ndDataSet,CILines2
10,-0.8,"-0.89,-0.7",-1.08,"-1.18,-0.99"
40,-1.21,"-1.32,-1.09",-1.38,"-1.5,-1.27"
60,-1.6,"-1.73,-1.46",-1.7,"-1.83,-1.56"
90,-1.85,"-1.99,-1.72",-1.89,"-2.03,-1.75"
120,-2.01,"-2.15,-1.87",-2.07,"-2.21,-1.93"
150,-2.1,"-2.24,-1.97",-2.16,"-2.3,-2.03"
180,-2.09,"-2.23,-1.94",-2.14,"-2.28,-1.99"
200,-2.07,"-2.21,-1.93",-2.14,"-2.28,-2"
250,-2.19,"-2.34,-2.04",-2.2,"-2.34,-2.05"
265,-2.16,"-2.31,-2.02",-2.24,"-2.39,-2.1"
290,-2.21,"-2.36,-2.06",-2.25,"-2.4,-2.1"
300,-2.25,"-2.4,-2.1",-2.22,"-2.37,-2.07"
340,-2.24,"-2.39,-2.09",-2.25,"-2.4,-2.1"
365,-2.3,"-2.45,-2.15",-2.27,"-2.42,-2.13"
400,-2.29,"-2.44,-2.14",-2.27,"-2.41,-2.12"
560,-2.28,"-2.43,-2.12",-2.3,"-2.45,-2.14"
650,-2.3,"-2.46,-2.13",-2.36,"-2.52,-2.2"
729,-2.35,"-2.51,-2.19",-2.33,"-2.5,-2.17"

The 1st column ("X-axis Label") represents a span of days. The 2nd and 4th columns are simple line data points and the 3rd and 5th columns contain the low and high values for the errorbar data (wrapped in double quotes).

Actual behaviour

After selecting the "view data table" option from export-data module, it looks like highcharts is trying to use the data from the first column ("X-axis Label") for the errorbar's low value and is using the combined "low,high" as the high value.

Live demo with steps to reproduce

https://jsfiddle.net/roatesTag/15cpshv4/

Product version

Highcharts 6.1.0

Affected browser(s)

All

@TorsteinHonsi

This comment has been minimized.

Collaborator

TorsteinHonsi commented Jun 8, 2018

First of all, Highcharts won't be able to parse two values inside a single cell (the quoted values).

The Data module is supposed to consume the columns it needs, so a line series takes the left column for X values, plus one column for Y values, the next error bar series takes the same X values column plus the subsequent two columns for low and high values. This seems to be broken. It only works correctly when the series type is set on chart level, which will now allow combined series types at all.

Minimal repro case: https://jsfiddle.net/15cpshv4/3/

@TorsteinHonsi TorsteinHonsi added the Bug label Jun 8, 2018

@TorsteinHonsi TorsteinHonsi self-assigned this Jun 8, 2018

@TorsteinHonsi

This comment has been minimized.

Collaborator

TorsteinHonsi commented Jun 8, 2018

Workaround

Supply a seriesMapping setting with X column specified. Note that the CSV itself is also modified to contain a single value in each cell: https://jsfiddle.net/15cpshv4/4/

Demo with the fix applied

https://jsfiddle.net/15cpshv4/5/

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