Skip to content

Latest commit

 

History

History
66 lines (59 loc) · 1.76 KB

.ideas.md

File metadata and controls

66 lines (59 loc) · 1.76 KB
  • a hidden series should be considered as non-existent (doesn't impact axes, range or whatever)
  • full redraw should happen when :
    • the options.series array change or deep change (add/remove one, hide/show one)
  • an update should happen when :
    • the options.axes change
  • there should be a super sweet CSS classes system so that people can style the **** out of the charts

Options :

$scope.options =
  axes:
    x:
      key: 'x'
      labelFunction: (value) -> value
      type: 'linear'
      min: 0
      max: 10
      ticks: 2
    y:
      type: 'linear'
      min: 0
      max: 1
      ticks: 5
    y2:
      type: 'linear'
      min: 0
      max: 1
      ticks: [1, 2, 3, 4]

  # Series styling should be handled in css
  # ideally, each series has either a css class or a function that returns a class
  # this way, the styling can be handled in a CSS file _and_ dynamically changed
  # each time $rootScope.$apply() is ran
  series: [
    {
      id: 'myId' # or auto-generated
      y: 'value'
      type: 'area' # can be 'area', 'column', 'dots', 'line' (default is 'line')
      label: 'Pouet'
      axis: 'y' # default is 'y'
      visible: true
      interpolation: # or undefined ?
        type: 'linear'
        tension: 0.7

      # color, thickness, stripes, dots, dashed ?
      cssClass: (series, index, ...?) -> 'my-series'
    }
  ]
  stacks: [
    {axis: "y", series: ["id_0", "id_1", "id_2"]}
  ]
  tooltip:

    # this should be better, without overlapping which is a pain to maitain
    # other modes could 'none'
    mode: 'scrubber'

    # this is a must have, and can be used in conjunction with 'none' so that
    # the tooltip is handled externally
    hook: (x, y, series) -> 'pouet'

  legend:
    mode: 'interactive' # 'inactive', 'hidden'