Attributes for altering the view of your axis.
Adds classes to the container holding your axis.
myXAxis : Plot.Element msg
myXAxis =
Plot.xAxis
[ Axis.view
[ Axis.classes [ "axis--x" ] ]
]Adds styles to the axis line.
myXAxis : Plot.Element msg
myXAxis =
Plot.xAxis
[ Axis.view
[ Axis.lineStyle [ ( "stroke", "blue" ) ] ]
]Position this axis to the lowest value on the opposite axis. E.g. if this attribute is added on an y-axis, it will be positioned to the left.
myXAxis : Plot.Element msg
myXAxis =
Plot.xAxis
[ Axis.view
[ Axis.positionLowest ]
]Position this axis to the highest value on the opposite axis. E.g. if this attribute is added on an y-axis, it will be positioned to the right.
myXAxis : Plot.Element msg
myXAxis =
Plot.xAxis
[ Axis.view
[ Axis.positionHighest ]
]Remove tick and value where the axis crosses the opposite axis.
myXAxis : Plot.Element msg
myXAxis =
Plot.xAxis
[ Axis.view [ Axis.cleanCrossings ] ]Anchor the ticks/labels on the inside of the plot. By default they are anchored on the outside.
myXAxis : Plot.Element msg
myXAxis =
Plot.xAxis
[ Axis.view
[ Axis.anchorInside ]
]By providing this attribute with a list of tick attributes, you may alter the values and ticks displayed as your axis' ticks.
myYAxis : Plot.Element msg
myYAxis =
Plot.yAxis
[ Axis.tick
[ Tick.view [ Tick.length 3 ]
, Tick.values [ 2, 4, 6 ]
]
]By providing this attribute with a list of label attributes, you may alter the values and ticks displayed as your axis' labels.
myYAxis : Plot.Element msg
myYAxis =
Plot.yAxis
[ Axis.tick
[ Label.view
[ Label.displace (10, 0)
, Label.format formatFunc
]
, Label.values [ 3, 5, 7 ]
]
]