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

Can't control tick generation #79

Closed
chnn opened this issue Jun 4, 2019 · 6 comments · Fixed by #330
Closed

Can't control tick generation #79

chnn opened this issue Jun 4, 2019 · 6 comments · Fixed by #330

Comments

@chnn
Copy link
Contributor

chnn commented Jun 4, 2019

It's desirable to format ticks using a binary unit prefix when plotting data whose y-value is measured in bytes.

But the y-axis generates tick marks at "nice" intervals, i.e. at powers of 10. These intervals are no longer nice when formatting numbers with a binary unit prefix.

For example, here's the same plot with ticks formatted using a decimal unit prefix:

Screen Shot 2019-06-04 at 2 58 24 PM

It has a nice tick of "6G". When formatting the ticks with a binary unit prefix, it looks like this:

Screen Shot 2019-06-04 at 2 58 31 PM

The generated tick is now "5.5879G" (6 gigabytes =~ 5.88 gibibytes), which is no longer nice.

@TCL735
Copy link
Contributor

TCL735 commented Feb 12, 2020

Requirements:

  • value axis ticks should allow a step and cover a range using that step

  • tooltip's _value unit can be a different scale than the tick labeling. Example: megabytes (or mebibytes) in the tooltip, while gigabytes (or gibibytes) on the tick labels. This allows the user to see precision in the tooltip and broader values by glancing at the axis.

@desa desa added this to the Giraffe Beta milestone Jun 9, 2020
@TCL735 TCL735 unassigned chnn Oct 8, 2020
@TCL735 TCL735 self-assigned this Oct 15, 2020
@TCL735
Copy link
Contributor

TCL735 commented Oct 19, 2020

The previous comment's 2nd point on having different scales for the value axis and tooltip should be broken down into two separate stories.

In this story, we will focus on changes to the axes. A separate story can focus on changes to the tooltip.

@TCL735
Copy link
Contributor

TCL735 commented Oct 19, 2020

Analysis:

Currently, Giraffe allows xTicks and/or yTicks to be specified. When either property is included in the config, that axis is not calculated by Giraffe. When the specified xTicks and/or yTicks are not in domain of the rendered graph, then that axis becomes unlabeled.

We will keep the above behavior and add two additional properties per axis that is mutually exclusively with the above.

New:
xTickStep and xTotalTicks are mutually exclusive with and subservient to xTicks
yTickStep and yTotalTicks are mutually exclusive with and subservient to yTicks

@TCL735
Copy link
Contributor

TCL735 commented Oct 21, 2020

There is an existing bug that can be fixed with this issue.

The bug is: when there are no y-axis ticks, the graph is wider because of the lack of margins. Margins were being calculated based on having y-axis ticks. Thus, no y-axis ticks means no margins. And when the graph is wider, the x-axis ticks get "erased" due to being overwritten by the redrawing of the wider graph.

To fix this bug, we will use a sample y-axis tick based on the graph data to calculate the margins when the user specifically selects zero for the number of y-axis ticks.

@TCL735
Copy link
Contributor

TCL735 commented Oct 23, 2020

There is a second part to this story: Integrate this new feature into ui

@TCL735
Copy link
Contributor

TCL735 commented Oct 29, 2020

Upon further review, it is better to close this story out. As this story only deals with the Giraffe work, which has been completed, we will open a separate story to track the UI integration work.

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