Git Product home page Git Product logo

Comments (9)

wirew0rm avatar wirew0rm commented on May 11, 2024

I can reproduce. This seems to be 2 (or even 3) different problems. on the left, the bar appears when panning a little bit to the left, on the right it shows when point reduction is turned off (renderer.setPointReduction(false)) but the last line segment is missing.
image

from chart-fx.

wirew0rm avatar wirew0rm commented on May 11, 2024

I got a partial fix, but there is a deeper problem with rendering histograms with non-equidistant bins. The dataset interface for Histograms returns the center and therefore the renderer cannot reproduce the actual binning. This will probably need some deeper api changes to get it right.

Your sample looks pretty equidistant, so if your usecase is equidistant use the min/max/nBins constructor which will give you an equidistant Histogram which internally works a little different.

from chart-fx.

karlduderstadt avatar karlduderstadt commented on May 11, 2024

Thanks so much for your fast response and very helpful feedback!

Yes, the bins are equidistant, so in principle the Histogram constructor that accepts min, max, and bin count would be ideal. Unfortunately, I ran into some trouble with that one which is why I switched to the constructor that just takes the list of bin boundaries.

When I plot the same data as I mentioned above with min = -2.0, max = 2.0, and bins = 10, I get the following histogram:
Screenshot 2020-01-16 at 21 55 09
As you can see all the bins are shifted toward the negative side by half a bin. I guess there is some shift introduced somewhere in the ErrorDataSetRenderer, unfortunately I haven't had time to look through and troubleshoot that code. I am sure you can more easily spot the issue and maybe fixing this would be a fast temporary solution.

Regarding the data reducer. For the current use case I turned it off and I don't think it is needed. I have noticed in general that if there are more than say 5-6 points in the dataset, the second to last point is always skipped. Even when zooming way in etc. If you like I can make a separate issue about that. Maybe I made a mistake in my implementation. I just thought I would mention it since you might have to look into the data reducer code based on your comments above.

from chart-fx.

RalphSteinhagen avatar RalphSteinhagen commented on May 11, 2024

Hi @karlduderstadt, just as an update:
the first/last bin not being drawn seems to be solved now by PR #132.

The issue of 'half-a-bin-shift' seems to occur only for the non-equidistant binning option which is a bit special. The latter does not (yet) provide the necessary API info of where to draw the specific edges and unfortunately, this cannot be automatically determined. This is different for the equidistant version where this is solved implicitly.

Hope this helps. The changes should be merged/published within the coming weeks. Let us know if you have further questions or suggestions, otherwise, I'd like to close this issue.

from chart-fx.

RalphSteinhagen avatar RalphSteinhagen commented on May 11, 2024

fixed by #132 and merged. closing issue

from chart-fx.

karlduderstadt avatar karlduderstadt commented on May 11, 2024

Hi @RalphSteinhagen,

Thanks very much for fixing this issue. Once you make a new release, I will test the fix and report back. Unfortunately, I haven't been able to configure my environment properly to compile and test out the unreleased version.

from chart-fx.

wirew0rm avatar wirew0rm commented on May 11, 2024

You could also use the snapshot build, we have recently added some documentation for that to our README.md: https://github.com/GSI-CS-CO/chart-fx#using-the-snapshot-repository

But it also won't be that long before the next release, so you can definitely also wait for that.
Thanks for keeping in touch.

from chart-fx.

karlduderstadt avatar karlduderstadt commented on May 11, 2024

So I finally had a chance to update to version 8.1.4 and test the histogram again. We use them everyday, but I just didn't have a chance to test the new version until now.

The first bin draws!! So that seems to be fixed. However, the last bin still don't draw for me. See image below:

Screenshot 2020-05-09 at 10 02 47

Am I missing something here. Is there some other way I should test this? Is there some way I can help. Perhaps if you point me to the relevant section of code, I can see if these is any solution I can implement on my side.

Again sorry I didn't test this earlier. Thanks very much for your efforts to fix this. You made such a wonderful charting library we rely completely on it a small library and gui we have written. Unfortunately, users have been complaining to me about the missing bins.

Thanks!!

from chart-fx.

RalphSteinhagen avatar RalphSteinhagen commented on May 11, 2024

Hi @karlduderstadt

I gave it a quick try and appears to work:
image

Could you check this against the master and/or the JDK11 snapshot @wirew0rm mentioned above? Unfortunately, we haven't had the time to backport all recent changes to JDK8 yet but plan to do another x.1.5 release soonish.

N.B. This will probably also the last x.1.y. release before we'll increase the minor number since we want to introduce some API changes w.r.t. handling of 3D datasets etc. If you have suggestions/feature requests... there is an open issue #44.

from chart-fx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.