- var labelStyle = {
- position: "absolute",
- fontSize: g.getOption('axisLabelFontSize') + "px",
- zIndex: 10,
- color: g.getOption('axisLabelColor'),
- width: g.getOption('axisLabelWidth') + "px",
- // height: this.attr_('axisLabelFontSize') + 2 + "px",
- lineHeight: "normal", // Something other than "normal" line-height screws up label positioning.
- overflow: "hidden"
+ var makeLabelStyle = function(axis) {
+ return {
+ position: "absolute",
+ fontSize: g.getOptionForAxis('axisLabelFontSize', axis) + "px",
+ zIndex: 10,
+ color: g.getOptionForAxis('axisLabelColor', axis),
+ width: g.getOption('axisLabelWidth') + "px",
+ // height: g.getOptionForAxis('axisLabelFontSize', 'x') + 2 + "px",
+ lineHeight: "normal", // Something other than "normal" line-height screws up label positioning.
+ overflow: "hidden"
+ };
+ }
+
+ var labelStyles = {
+ x : makeLabelStyle('x'),
+ y : makeLabelStyle('y'),
+ y2 : makeLabelStyle('y2'),