Commit 97f2a127 authored by David Schnur's avatar David Schnur

Axes can now have basic horizontal text labels.

Labels are provided via a 'label' option on the axis, and can be styled
with the flot-axis-label class.  The labelFont option works similarly to
tickFont, as an override for the default font or the flot-axis-label
class.  The labelPadding option adds extra space between the axis and
its label.

Since most plots with axis labels currently use @markrcote's
flot-axislabels plugin, we also support the axisLabel and
axisLabelPadding options, and the axisLabels / axis[name]Label CSS
classes, to make it as easy as possible to transition from that plugin.
These are deprecated, and will be removed in 1.0.

The implementation uses the internal text API introduced in 0.8.
parent 5209b8cd
......@@ -270,6 +270,10 @@ xaxis, yaxis: {
tickHeight: null or number
tickFont: null or font-options object
label: null or string
labelFont: null or font spec object
labelPadding: null or number
alignTicksWithAxis: null or number
reserveSpace: null or true
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment