Setting it up |
For any real-time chart, you can set up the alert manager as under: |
<chart> … … <alerts> <alert minValue='240' maxValue='300' action='callJS' param="alert('Value between 240 and 300');" /> <alert minValue='300' maxValue='360' action='showAnnotation' param='statusRed' occurOnce='0'/> <alert minValue='360' maxValue='400' action='playsound' param='YourSound.mp3'/> </alerts> </chart> { "chart": {}, ... "alerts": { "alert": [ { "minvalue": "240", "maxvalue": "300", "action": "callJS", "param": "alert('Value between 240 and 300');" }, { "minvalue": "300", "maxvalue": "360", "action": "showAnnotation", "param": "statusRed", "occuronce": "0" }, { "minvalue": "360", "maxvalue": "400", "action": "playsound", "param": "YourSound.mp3" } ] } } |
The container element for alerts is <alerts>, which is a child of the <chart> element. This element cannot have any attribute. Now, for each alert range, you need to define an <alert> element as child of <alerts> element. The <alert> element can have the following attributes:
|