Skip to content

AxisRenderer: Disabled label interval normalization when interval < granularity#3111

Open
Jetz72 wants to merge 1 commit intoPhilJay:masterfrom
Jetz72:patch-1
Open

AxisRenderer: Disabled label interval normalization when interval < granularity#3111
Jetz72 wants to merge 1 commit intoPhilJay:masterfrom
Jetz72:patch-1

Conversation

@Jetz72
Copy link
Copy Markdown

@Jetz72 Jetz72 commented May 12, 2017

Made this slight tweak in a project I was working on today. I had a granularity of 60000 (1 minute), but because of the normalization, labels were still being printed with an interval of 100000. I changed it so if the target interval is below the granularity value, it'll skip the normalization step. This allowed the labels to align with my data points when zoomed all the way in, which were also spaced one every 60000. Probably other ways to achieve that result, and this one won't work for irregularly spaced points or X values that aren't multiples of the granularity, but I don't think this one will cause any further issues in those cases.

Made this slight tweak in a project I was working on today. I had a granularity of 60000 (1 minute), but because of the normalization, labels were still being printed with an interval of 100000. I changed it so if the target interval is below the granularity value, it'll skip the normalization step. This allowed the labels to align with my data points when zoomed all the way in, which were also spaced one every 60000. Probably other ways to achieve that result, and this one won't work for irregularly spaced points or X values that aren't multiples of the granularity, but I don't think this one will cause any further issues in those cases.
@Jetz72 Jetz72 changed the title AxisRenderer: Tweaked label interval normalization AxisRenderer: Disabled label interval normalization when interval < granularity May 12, 2017
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 this pull request may close these issues.

1 participant