-
Notifications
You must be signed in to change notification settings - Fork 122
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
Rendering bug with stacked data #487
Comments
I've compared our rendering to how Vega deals with the same dataset, for reference: |
@wylieconlon the y axis is a linear scale but in the data table the y values are strings. |
Okay yes, I see that now if I convert the values to numbers they are rendered correctly. What I don't understand is- if the |
It's a d3 scale magic :D |
Or there is something else going on in our chart that wrongly interpret the numbers here. Let me check and I will be back |
The stacked bars are computed adding up the previous value with the current one. This works fine if the passed values are numbers. If the number is codified as a string, the resulting stacked value is a wrongly concatenated string of values. This commit cast every y value to a number, if NaN or null it will use null. fix elastic#487
The stacked bars are computed adding up the previous value with the current one. This works fine if the passed values are numbers. If the number is codified as a string, the resulting stacked value is a wrongly concatenated string of values. This commit cast every y value to a number, if NaN or null it will use null fix #487
🎉 This issue has been resolved in version 15.0.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [15.0.5](elastic/elastic-charts@v15.0.4...v15.0.5) (2019-12-12) ### Bug Fixes * render stacked bar with stringified values ([opensearch-project#488](elastic/elastic-charts#488)) ([24b9351](elastic/elastic-charts@24b9351)), closes [opensearch-project#487](elastic/elastic-charts#487)
I am testing out data formats that are used in Kibana, and found this example. For this sample SQL query there is incorrect rendering.
Sample query:
SELECT geo.src, geo.dest, COUNT(*) as C GROUP BY geo.src, geo.dest ORDER BY COUNT(*) DESC LIMIT 50
This rendering shows all the data on the legend, but does not draw any bars.
I've created a minimal test case here for you to see the data used: https://codesandbox.io/s/async-meadow-divin
See the full data set
There is also some connection to this Canvas issue: elastic/kibana#52419
The text was updated successfully, but these errors were encountered: