Created attachment 578505 [details] [diff] [review] implement support for minor gridlines when logBase is set 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.
Created attachment 578511 [details] [diff] [review] wip based on atoll-1, implements configurable minor gridline count 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
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.