-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,63 @@ | ||
# flot-events | ||
|
||
Flot Charting Library Plugin to show Events-Markers | ||
|
||
This plugin is based on [Joel Oughton](https://github.com/oughton)s ["Event Graphics" plugin](http://joeloughton.com/blog/web-applications/flot-plugins-event-graphics/) from the [https://github.com/oughton/flot-plugin-collection](flot-plugin-collection). | ||
## Interactive Example | ||
|
||
* [Open Demo](./example/) | ||
* [Show example source](https://github.com/mojoaxel/flot-events/blob/master/example/index.html) | ||
|
||
## Docs | ||
|
||
```javascript | ||
var types = [{ | ||
eventType: "Info", | ||
color: "blue" | ||
}, { | ||
eventType: "Critical", | ||
color: "red", // e.g red, #F00, #FF0000, [gray] | ||
markerSize: 10, //in px, [5] | ||
position: 'BOTTOM', //[TOP], BOTTOM | ||
lineStyle: 'solid' //dotted, [dashed], solid | ||
}]; | ||
|
||
var events = [{ | ||
min: 1, | ||
max: 1, | ||
eventType: "Info", | ||
title: "Info Event", | ||
description: "At position x=1 something happend!" | ||
}, { | ||
min: 2, | ||
max: 3, | ||
eventType: "Critical", | ||
title: "Critical region", | ||
description: "Between x=2..3 something is critical" | ||
}]; | ||
|
||
var plot = $.plot($('#plot'), [ data ], { | ||
/* this activates the events plugin and sets options */ | ||
events: { | ||
data: events, | ||
types: types | ||
}, | ||
/* optional for range highlighting; depends on jquery.flot.selection.*/ | ||
selection: { | ||
color: "#e8cfac" | ||
}, | ||
}); | ||
``` | ||
|
||
This plugin is tested to work together with these plugins: | ||
|
||
* jquery.flot.axislabels | ||
* jquery.flot.canvas | ||
* jquery.flot.downsample | ||
* jquery.flot.tooltip | ||
* jquery.flot.time | ||
* jquery.flot.selection | ||
* jquery.flot.navigate | ||
|
||
## License | ||
|
||
* Dual licensed under MIT and GPL-2.0+ | ||
Dual licensed under [MIT](http://opensource.org/licenses/MIT) and [GPLv2](http://opensource.org/licenses/gpl-2.0.php) | ||
This plugin is based on [Joel Oughtons](https://github.com/oughton) ["Event Graphics" plugin](http://joeloughton.com/blog/web-applications/flot-plugins-event-graphics/) from his [flot-plugin-collection](https://github.com/oughton/flot-plugin-collection) witch is also licensed under MIT and GPLv2. |