Skip to content
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

Unhandled division by zero in Charter #1100

Closed
seandenigris opened this issue Aug 3, 2015 · 2 comments
Closed

Unhandled division by zero in Charter #1100

seandenigris opened this issue Aug 3, 2015 · 2 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 1100

In Charter, I get divide by zero exception when y values are zero. Here is an example
to reproduce the bug:

| b data minDate view color |
    view := RTView new.
    b := RTCharterBuilder new.
    b view: view.
    b extent: 400 @ 200.
    data := {DateAndTime now -> 0 . DateAndTime now + 200 -> 0} asDictionary.
    minDate := data keys min.
    color := Color random.

    b interaction popupText: [:each | each ] .
    b shape ellipse
        size: 10;
        color: color.
    b points: data keys.
    b
        x: [ :aDate | aDate asUnixTime - minDate asUnixTime ];
        y: [ :each | data at: each ].
    b connectDotColor: color.
    b axisConfiguration
        labelRotation: -30;
        minValue: 1000;
        numberOfTicks: data keys size -1;
        labelConvertion: [ :v | (DateAndTime fromUnixTime: (v + minDate asUnixTime)) asDate].
    b axisX.
    b build.

Reported by usman.bhatti on 2014-12-01 09:41:37

@seandenigris
Copy link
Contributor Author

Same applies for Grapher when Y values are zero.

Reported by usman.bhatti on 2014-12-01 11:40:41

@seandenigris
Copy link
Contributor Author

This is fixed in today's Roassal version

Reported by alexandre.bergel on 2014-12-08 21:04:29

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant