Commit 27c70111 authored by David Schnur's avatar David Schnur

Updated the API docs for axis text changes.

parent bb0acac9
...@@ -266,11 +266,27 @@ you can also set the color of the ticks separately with "tickColor" ...@@ -266,11 +266,27 @@ you can also set the color of the ticks separately with "tickColor"
(otherwise it's autogenerated as the base color with some (otherwise it's autogenerated as the base color with some
transparency). transparency).
You can customize the font used to draw the labels with CSS or You can customize the font used to draw the labels with CSS or directly via the
directly with "font". The default value of null means that the font is "font" option. When "font" is null - the default - each tick label is given the
read from the font style on the placeholder element (80% the size of 'flot-tick-label' class. For compatibility with Flot 0.7 and earlier the labels
that to be precise). If you set it directly with "font: { ... }", the are also given the 'tickLabel' class, but this is deprecated and scheduled to
format is like this: be removed with the release of version 1.0.0.
To enable more granular control over styles, labels are divided between a set
of text containers, with each holding the labels for one axis. These containers
are given the classes 'flot-text', 'flot-[x|y]-axis', and 'flot-[x|y]#-axis',
where '#' is the number of the axis when there are multiple axes. For example,
the x-axis labels for a simple plot with only one x-axis might look like this:
```html
<div class='flot-text flot-x-axis flot-x1-axis'>
<div class='flot-tick-label'>January 2013</div>
...
</div>
```
For direct control over label styles you can also provide "font" as an object
with this format:
```js ```js
{ {
...@@ -278,7 +294,8 @@ format is like this: ...@@ -278,7 +294,8 @@ format is like this:
style: "italic", style: "italic",
weight: "bold", weight: "bold",
family: "sans-serif", family: "sans-serif",
variant: "small-caps" variant: "small-caps",
color: "#545454"
} }
``` ```
......
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