Flotr 2 Architecture Notes


Global:
======

Flotr.js -
  versioning information
  browser detection
  extension (plugins, graph types)
  draw
  clone / merge
  tick size
  tick formatter
  engineering notation
  magnitude
  rad, pixel, floor
  drawText
  measureText
  getBestTextAlign
  align map
  compatibility


Graph Architecture:
===================

Axis -
  all series
  orientation
  ticks (major, minor)
  scale (d2p, p2d, logarithmic)
  notion of stacks

Series -
  per 'data'
  notion of range (x, y, min, max)

Graph -
  DOM constructon
  event attachment
  options initialization
  data range calculations
  canvas spacing calculations
  event normalization
  draw methods
  DOM cleanup
  event cleanup


Utilities:
==========

Color
  build colors
  parse textual color data
  convert colors
  clone colors

Text
  calculate text size
  canvas size
  html size

Date
  formatting
  constants


Spacing Calculation
===================

Flotr
  calculate data
  calculate margins

Chart
  calculate Data Ranges - Explicit or auto data minimum, maximums
  calculate Data Range Extensions - By chart type, extend data range with needs of chart type (ie. stacked bars, stacked lines)
  add Chart Padding - By chart type

Text
  use explicit margins
  calculate label margins
  calculate title margins

