@@ -167,7 +167,7 @@ var options = {
167
167
points: { show: true }
168
168
}
169
169
};
170
-
170
+
171
171
$ .plot (placeholder, data, options);
172
172
```
173
173
@@ -254,10 +254,10 @@ xaxis, yaxis: {
254
254
min: null or number
255
255
max: null or number
256
256
autoscaleMargin: null or number
257
-
257
+
258
258
transform: null or fn: number - > number
259
259
inverseTransform: null or fn: number - > number
260
-
260
+
261
261
ticks: null or number or ticks array or (fn: axis - > ticks array)
262
262
tickSize: number or array
263
263
minTickSize: number or array
@@ -267,7 +267,7 @@ xaxis, yaxis: {
267
267
labelWidth: null or number
268
268
labelHeight: null or number
269
269
reserveSpace: null or true
270
-
270
+
271
271
tickLength: null or number
272
272
273
273
alignTicksWithAxis: null or number
@@ -415,7 +415,7 @@ ticks: [[0, "zero"], [1.2, "one mark"], [2.4, "two marks"]]
415
415
```
416
416
417
417
You can mix the two if you like.
418
-
418
+
419
419
For extra flexibility you can specify a function as the "ticks"
420
420
parameter. The function will be called with an object with the axis
421
421
min and max and should return a ticks array. Here's a simplistic tick
@@ -575,7 +575,7 @@ In Python you can get it with something like:
575
575
calendar.timegm(datetime_object.timetuple()) * 1000
576
576
```
577
577
In Ruby you can get it using the ` #to_i ` method on the
578
- [ ` Time ` ] ( http://apidock.com/ruby/Time/to_i ) object. If you're using the
578
+ ` Time ` object. If you're using the
579
579
` active_support ` gem (default for Ruby on Rails applications) ` #to_i ` is also
580
580
available on the ` DateTime ` and ` ActiveSupport::TimeWithZone ` objects. You
581
581
simply need to multiply the result by 1000:
@@ -765,7 +765,7 @@ The options inside "series: {}" are copied to each of the series. So
765
765
you can specify that all series should have bars by putting it in the
766
766
global options, or override it for individual series by specifying
767
767
bars in a particular the series object in the array of data.
768
-
768
+
769
769
The most important options are "lines", "points" and "bars" that
770
770
specify whether and how lines, points and bars should be shown for
771
771
each data series. In case you don't specify anything at all, Flot will
@@ -801,8 +801,8 @@ the y axis if "horizontal" is true), contrary to most other measures
801
801
that are specified in pixels. For instance, for time series the unit
802
802
is milliseconds so 24 * 60 * 60 * 1000 produces bars with the width of
803
803
a day. "align" specifies whether a bar should be left-aligned
804
- (default), right-aligned or centered on top of the value it represents.
805
- When "horizontal" is on, the bars are drawn horizontally, i.e. from the
804
+ (default), right-aligned or centered on top of the value it represents.
805
+ When "horizontal" is on, the bars are drawn horizontally, i.e. from the
806
806
y axis instead of the x axis; note that the bar end points are still
807
807
defined in the same way so you'll probably want to swap the
808
808
coordinates if you've been plotting vertical bars first.
@@ -1004,7 +1004,7 @@ item: {
1004
1004
}
1005
1005
` ` `
1006
1006
1007
- For instance, if you have specified the data like this
1007
+ For instance, if you have specified the data like this
1008
1008
1009
1009
` ` ` js
1010
1010
$ .plot ($ (" #placeholder" ), [ { label: " Foo" , data: [[0 , 10 ], [7 , 3 ]] } ], ... );
@@ -1155,7 +1155,7 @@ can call:
1155
1155
1156
1156
Returns the calculated offset of the data point at (x, y) in data
1157
1157
space within the placeholder div. If you are working with multiple
1158
- axes, you can specify the x and y axis references, e.g.
1158
+ axes, you can specify the x and y axis references, e.g.
1159
1159
1160
1160
` ` ` js
1161
1161
o = pointOffset ({ x: xpos, y: ypos, xaxis: 2 , yaxis: 3 })
@@ -1215,8 +1215,8 @@ Flot to keep track of its state, so be careful.
1215
1215
With multiple axes, the extra axes are returned as x2axis, x3axis,
1216
1216
etc., e.g. getAxes().y2axis is the second y axis. You can check
1217
1217
y2axis.used to see whether the axis is associated with any data
1218
- points and y2axis.show to see if it is currently shown.
1219
-
1218
+ points and y2axis.show to see if it is currently shown.
1219
+
1220
1220
- getPlaceholder()
1221
1221
1222
1222
Returns placeholder that the plot was put into. This can be useful
@@ -1226,7 +1226,7 @@ Flot to keep track of its state, so be careful.
1226
1226
1227
1227
Returns the canvas used for drawing in case you need to hack on it
1228
1228
yourself. You' ll probably need to get the plot offset too.
1229
-
1229
+
1230
1230
- getPlotOffset ()
1231
1231
1232
1232
Gets the offset that the grid has within the canvas as an object
@@ -1242,7 +1242,7 @@ Flot to keep track of its state, so be careful.
1242
1242
if you modify the values in here, Flot will use the new values.
1243
1243
If you change something, you probably have to call draw () or
1244
1244
setupGrid () or triggerRedrawOverlay () to see the change.
1245
-
1245
+
1246
1246
1247
1247
## Hooks ##
1248
1248
@@ -1254,7 +1254,7 @@ gets access to the internal data structures in Flot.
1254
1254
Here's an overview of the phases Flot goes through:
1255
1255
1256
1256
1. Plugin initialization, parsing options
1257
-
1257
+
1258
1258
2. Constructing the canvases used for drawing
1259
1259
1260
1260
3. Set data: parsing data specification, calculating colors,
@@ -1270,7 +1270,7 @@ Here's an overview of the phases Flot goes through:
1270
1270
1271
1271
7. Responding to events, if any
1272
1272
1273
- 8. Shutdown: this mostly happens in case a plot is overwritten
1273
+ 8. Shutdown: this mostly happens in case a plot is overwritten
1274
1274
1275
1275
Each hook is simply a function which is put in the appropriate array.
1276
1276
You can add them through the "hooks" option, and they are also available
@@ -1295,22 +1295,22 @@ hooks in the plugins bundled with Flot.
1295
1295
- processOptions [phase 1]
1296
1296
1297
1297
` ` ` function (plot , options )```
1298
-
1298
+
1299
1299
Called after Flot has parsed and merged options. Useful in the
1300
1300
instance where customizations beyond simple merging of default
1301
1301
values is needed. A plugin might use it to detect that it has been
1302
1302
enabled and then turn on or off other options.
1303
1303
1304
-
1304
+
1305
1305
- processRawData [phase 3]
1306
1306
1307
1307
```function(plot, series, data, datapoints)```
1308
-
1308
+
1309
1309
Called before Flot copies and normalizes the raw data for the given
1310
1310
series. If the function fills in datapoints.points with normalized
1311
1311
points and sets datapoints.pointsize to the size of the points,
1312
1312
Flot will skip the copying/normalization step for this series.
1313
-
1313
+
1314
1314
In any case, you might be interested in setting datapoints.format,
1315
1315
an array of objects for specifying how a point is normalized and
1316
1316
how it interferes with axis scaling. It accepts the following options:
@@ -1430,7 +1430,7 @@ hooks in the plugins bundled with Flot.
1430
1430
state by drawing something (add a drawOverlay hook and call
1431
1431
triggerRedrawOverlay) or firing an externally visible event for
1432
1432
user code. See the crosshair plugin for an example.
1433
-
1433
+
1434
1434
Currently, eventHolder actually contains both the static canvas
1435
1435
used for the plot itself and the overlay canvas used for
1436
1436
interactive features because some versions of IE get the stacking
@@ -1469,7 +1469,7 @@ hooks in the plugins bundled with Flot.
1469
1469
add a callback to clean up after you. Take a look at the section in
1470
1470
the [PLUGINS](PLUGINS.md) document for more info.
1471
1471
1472
-
1472
+
1473
1473
## Plugins ##
1474
1474
1475
1475
Plugins extend the functionality of Flot. To use a plugin, simply
0 commit comments