Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
mojoaxel committed Feb 23, 2015
1 parent 0b88cc1 commit 9bfe6a4
Showing 1 changed file with 59 additions and 3 deletions.
62 changes: 59 additions & 3 deletions README.md
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.

0 comments on commit 9bfe6a4

Please sign in to comment.