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

fixes-336: Extend the Ticker interface to allow passing a format function #362

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on May 25, 2017

  1. fixes-336: Extend the Ticker interface to allow passing a format func…

    …tion
    
    This allows for easy wrappers around the plot.DefaultTicks struct with
    custom format functions:
    
        type myCustomFormatTicks struct{}
    
        var _ plot.Ticker = myCustomFormatTicks{}
    
        func (myCustomFormatTicks) Ticks(min, max float64, format func(v float64, prec int) string) (ticks []plot.Tick) {
          return plot.DefaultTicks{}.Ticks(min, max, myFormatFloatTick)
        }
    
        func myFormatFloatTick(v float64, prec int) string {
               return strconv.FormatFloat(floats.Round(v, prec), 'g', 8, 64)
        }
    
        p.Y.Tick.Marker = myCustomFormatTicks{}
    DavidGamba committed May 25, 2017
    Configuration menu
    Copy the full SHA
    a63a4c6 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2017

  1. fixes-336: Extend the Ticker interface to allow passing a format func…

    …tion
    
    * Document the extra argument in the Ticker interface.
    * Weave the format arg through the call to DefaultTicks when applicable.
    * Add an extra test with the additional argument.
    DavidGamba committed Jun 18, 2017
    Configuration menu
    Copy the full SHA
    7e95849 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2017

  1. fixes-336: Extend the Axis struct to have a Tick.Format field

    Allows to define a custom Tick format function.
    DavidGamba committed Sep 5, 2017
    Configuration menu
    Copy the full SHA
    068ee8d View commit details
    Browse the repository at this point in the history
  2. fixes-336: Fix typo

    DavidGamba committed Sep 5, 2017
    Configuration menu
    Copy the full SHA
    9249345 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2017

  1. fixes-336: Expose DefaultTickFormat function

    And set it by default on axis.makeAxis
    David Gamba committed Sep 9, 2017
    Configuration menu
    Copy the full SHA
    6430bad View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2017

  1. Configuration menu
    Copy the full SHA
    f4e7673 View commit details
    Browse the repository at this point in the history