This module contains attributes for editing elements in Chart and Chart.Svg. See
Chart for usage examples.
Often a single attribute can change several different configurations, so the categories below are only guiding.
Change the lower bound of an axis.
CA.lowest -5 CA.orLower initial -- { dataMin = 0, dataMax = 10, min = -5, max = 10 }
CA.lowest -5 CA.orHigher initial -- { dataMin = 0, dataMax = 10, min = 0, max = 10 }
CA.lowest 2 CA.exactly initial -- { dataMin = 0, dataMax = 10, min = 2, max = 10 }
CA.lowest 2 CA.less initial -- { dataMin = 0, dataMax = 10, min = -2, max = 10 }
CA.lowest 3 CA.more initial -- { dataMin = 0, dataMax = 10, min = 3, max = 10 }where
initial : Axis
initial =
{ dataMin = 0, dataMax = 10, min = 0, max = 10 }Same as lowest, but changes upper bound.
See lowest for usage examples.
See lowest for usage examples.
See lowest for usage examples.
See lowest for usage examples.
See lowest for usage examples.
Set an axis to an exact window.
CA.window 2 5 initial -- { dataMin = 0, dataMax = 10, min = 2, max = 5 }where
initial : Axis
initial =
{ dataMin = 0, dataMax = 10, min = 0, max = 10 }Resets axis to fit data bounds.
Given an axis, find the value within it closest to zero.
CA.zero { dataMin = 0, dataMax = 10, min = 2, max = 5 } -- 2
CA.zero { dataMin = 0, dataMax = 10, min = -5, max = 5 } -- 0
CA.zero { dataMin = 0, dataMax = 10, min = -5, max = -2 } -- -2Get the middle value of your axis.
Get the value at a certain percentage of the length of your axis.