Closed Bug 707072 Opened 13 years ago Closed 13 years ago

add logBase minor gridline support to graphite

Categories

(Cloud Services :: Operations: Metrics/Monitoring, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Atoll, Unassigned)

Details

Attachments

(2 files)

      No description provided.
Minor gridlines are calculated by taking each major Y axis value (from smallest to second largest), adding one half of the Y step value, and then drawing a minor gridline at that position.

This patch has two key changes.

First, rather than adding one half of the Y step value, we calculate the midpoint of the two values.  This produces the correct minor gridline value for either linear or log Y axis.

Second, when logscale Y, append a calculated "next value" to the list of Y label values.  The extra value ensures that the final minor gridline is calculated at all and provides the required next value for the calculation itself.  yTop comparisons are doubled to permit the last two minor gridlines to be drawn.

When working correctly on log Y, each minor Y line will be about two thirds of the way up from the previous major Y line, and each gap between two major Y lines will have a minor Y line.

Deployed to stage and works with every case I've tested.
By default, graphite hard-codes 1 minor gridline.

This patch is a work-in-progress implementation of support for altering the number of minor gridlines between each major gridline.

The only piece missing is to add support for a new URL parameter "minorY" and then replace all instances of "minorY" with "self.minorY".

This is now deployed to staging and appears to be working fine.
Patch accepted and merged upstream:

https://bazaar.launchpad.net/~graphite-dev/graphite/main/revision/616
https://code.launchpad.net/~whd/graphite/configurable-minor-gridlines

Pencil support forthcoming.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: