-
Notifications
You must be signed in to change notification settings - Fork 93
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
BarChart: non equidistand data and last data point not drawn #265
Comments
@RalphSteinhagen Sorry for bothering you my friend, but please I have a question, I am using the same solution as the previous problem. I had a problem when using small numbers. the bars not rendered as expected. Can you help me? |
@osaidmakhalfeh you seem to have non-equidistant data in your bar-chart (notably the point around x=20 which is about 15 units away from its neighbour). The relative-width-based bar renderer cannot easily handle this (width ~ 1/2 distance to neighbouring point). You may want to use either a fixed spacing between x-values or a custom bar width: errorRenderer2.setDrawBars(true);
errorRenderer2.setDynamicBarWidth(false);
errorRenderer2.setBarWidth(5); Alternatively, you may want to check out the histogram samples and the ErrorDataSetRenderingStylingSample in particular. The latter has a UI where you can play with the various settings... May I ask what your targeted application/use-case is? Sometimes this helps to get a feeling for what you would like to achieve. Thanks in advance and hope the above helps. |
@RalphSteinhagen Thank you for your response again my amazing friend. x -> [12.6, 12.5, 12.4, 12.3, 12.2] I tried to draw the above data on the same example project. Unfortunately, there is one problem while drawing the minimum and the maximum points. I do not know why are these two points, not rendered. For the app I'm working on, it's an app that reads data from a hardware sensor and handles some equations. We may use this data to do some nature-specific statistics. |
@osaidmakhalfeh the default ErrorDataSetRenderer setting performs a data reduction in case data points overlap i.e. if they are drawn on or nearly on the same pixel (the minimum distance is configurable). If you have only a few data points (ie. < 1k) and do not want this point reduction feature, you may disable this by |
I was able to reproduce the issue with the ErrorDataSetRendererStyling sample, the inverted x-Axis seems to prevent the first and last point from being drawn. |
Hi Dears,
I'm facing a problem while drawing a barChart with small values for the yAxis.
here is a snapshot for the values I'm trying to draw:
Unfortunately, the result looks like that there is one bar rendered, but it took the full width of the screen, here is a snapshot of it.
here is my sample to share the knowledge.
https://github.com/osaidmakhalfeh/testChartsProject/blob/master/pcCharts/src/main/java/BarChart.java
Thanks again.
The text was updated successfully, but these errors were encountered: