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

Sharp lines for charts with step interpolation #57

Closed
rightfold opened this issue Dec 31, 2014 · 1 comment · Fixed by #134
Closed

Sharp lines for charts with step interpolation #57

rightfold opened this issue Dec 31, 2014 · 1 comment · Fixed by #134

Comments

@rightfold
Copy link

Step charts look quite fuzzy. It would be nice if there were an option for sharp lines, similar to the option that is available for grid lines.

@rightfold rightfold changed the title Sharp lines for step charts Sharp lines for charts with step interpolation Dec 31, 2014
@WofWca
Copy link
Collaborator

WofWca commented Sep 14, 2021

Workaround: consider lineWidth: 2

Possible solutions:

  • Add/subtract 0.5 from x & y here:

    smoothie/smoothie.js

    Lines 970 to 971 in c849bef

    context.lineTo(x,lastY);
    context.lineTo(x,y);

    just as with grid's sharpLines . Though some might say that it makes the data displayed incorrect.
  • Add an option called something like offsetPixels (or offsetPixelsX, offsetPixelsY) that would offset the whole canvas instead of just the data line. It's kind of conflicting with grid's sharpLines option though.

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

Successfully merging a pull request may close this issue.

2 participants