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

Setting the scale tick distance doesn't have the expected effect on axis ticks #530

Open
brianjenkins94 opened this issue Sep 4, 2020 · 1 comment
Labels
documentation API Documentation

Comments

@brianjenkins94
Copy link

brianjenkins94 commented Sep 4, 2020

🐛 Bug report

Steps to Reproduce

We've just been making minor tweaks to this example: https://observablehq.com/@miralemd/picassojs-gantt-chart

But it hasn't been going particularly well.

Adding too much data makes the y-axis disappear.

Most values that we set the (not super well documented) scale tick distance parameter to, have no effect.

Here's a simplified codepen of our chart:

https://codepen.io/brianjenkins94/pen/XWdzPYE

Expected behavior

An x-axis with 7-day demarcations.

Actual behavior

An x-axis with 12-day demarcations.

Versions

  • picasso.js: v0.34.0
@cbt1
Copy link
Collaborator

cbt1 commented Feb 3, 2021

"Adding too much data makes the y-axis disappear."

  • That would be the expected behaviour given all labels cannot fit without overlapping each other. In such case you either have to reduce the amount of data, increase the chart size or introduce a mechanism to scroll.

"Most values that we set the (not super well documented) scale tick distance parameter to, have no effect."

  • Agree, it's in need of a lot better documentation. I did some quick testing and the distance setting does affect the number of ticks. It's a number that represent the distance between each tick in pixels. It's also an approximation, so a value of 100 might yield a tick every 50 or 150 px instead, depending on a couple of factors such as total distance available and length of the formatted tick. For more control it's possible to set explicit tick values.

I'll label this a documentation for now.

@cbt1 cbt1 added the documentation API Documentation label Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation API Documentation
Projects
None yet
Development

No branches or pull requests

2 participants