Skip to content

Custom axis labels: Missing functionality, interface confusion. #472

@GoogleCodeExporter

Description

@GoogleCodeExporter
Based on nightly build Jan 31, 2015.

- Present interface

SHOW/HIDE AUTO GRID 
setShowGrid(boolean) // X and Y
setShowGridX(boolean) // X only
setShowGridY(boolean) // Y only

SHOW/HIDE CUSTOM GRID 
setShowCustomTextGrid(boolean) // X and Y
setShowCustomTextGridX(boolean) // X only
setShowCustomTextGridY(boolean) // Y only

SHOW/HIDE AUTO AXIS LABEL 
setShowLabels(boolean) // X and Y, affects all, custom too!
// No singular X/Y.

SHOW/HIDE CUSTOM AXIS LABEL 
// None, stuck with above.

- Problems

(1) Major.

Cannot toggle custom labels only.
Cannot toggle X and Y labels separately.

Discussion: If using custom labels, ask question why? Good chance user does not 
want auto labels if using custom. 

I have a descending Y axis which requires custom labels. If use undocumented 
high-min/low-max approach custom labels do not show (bug?). If use custom 
labels and transform data (easy) then are forced to show auto labels with my 
custom labels - one descending the other ascending!


(2) Minor

Inconsistent naming: TextLabel vs CustomText. X before vs X after (less 
important)
e.g.
labels: addXTextLabel(), clearXTextLabels(), removeXTextLabel()
grid: setShowCustomTextGridX()

NB. Custom text labels can be numeric, therefore "CustomLabel" better (doesn't 
imply alphabetic)? But have CustomText in grid methods...

Better: addCustomLabelX(), clearCustomLabelsX(), removeCustomLabel()


- Advised best solution, ignores backward compatibility

SHOW/HIDE AUTO GRID - No Change
setShowGrid(boolean)
setShowGridX(boolean)
setShowGridY(boolean)

SHOW/HIDE CUSTOM GRID - Name change only
setShowCustomLabelGrid(boolean)
setShowCustomLabelGridX(boolean
setShowCustomLabelGridY(boolean)

SHOW/HIDE AUTO AXIS LABEL - Affects auto labels only. Add new X and Y specific. 
setShowLabels(boolean)
setShowLabelsX(boolean)
setShowLabelsY(boolean)

SHOW/HIDE CUSTOM AXIS LABEL - All new. 
setShowCustomLabels(boolean)
setShowCustomLabelsX(boolean)
setShowCustomLabelsY(boolean)

For others always use CustomLabel to indicate custom text/label e.g. 
addCustomLabelX(), clearCustomLabelsX(), removeCustomLabel().

- Advised compromise solution, backwards compatible (99% !)

SHOW/HIDE AUTO GRID - No change
setShowGrid(boolean)
setShowGridX(boolean)
setShowGridY(boolean)

SHOW/HIDE CUSTOM GRID - No Change
setShowCustomTextGrid(boolean)
setShowCustomTextGridX(boolean)
setShowCustomTextGridY(boolean)

SHOW/HIDE AUTO AXIS LABEL - Affects auto labels only. Add new X and Y specific. 
setShowLabels(boolean) // Functional change, breaks compatibility? *
setShowLabelsX(boolean) 
setShowLabelsY(boolean)

* Or does it? If user isn't showing any labels then wouldn't add custom labels.

SHOW/HIDE CUSTOM AXIS LABEL - All new (Naming? Align with setShowCustomTextGrid 
or addXTextLabel?)
setShowCustomLabels(boolean)
setShowCustomLabelsX(boolean)
setShowCustomLabelsY(boolean)


- Thinking bigger

Do mass general interface clean-up e.g. 'Best' solution above, and others?
Release under new namespace.

Original issue reported on code.google.com by harrycal...@gmail.com on 1 Feb 2015 at 3:20

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions