{"_id":"highcharts-annotations","_rev":"6-1b55919fd25a9044f8ccf9c151ee4605","name":"highcharts-annotations","description":"Highcharts plugin to add dynamic annotations to charts.","dist-tags":{"latest":"1.3.3"},"versions":{"1.3.0":{"name":"highcharts-annotations","version":"1.3.0","description":"Highcharts plugin to add dynamic annotations to charts.","main":"js/annotations.js","repository":{"type":"git","url":"git+https://github.com/blacklabel/annotations.git"},"keywords":["highcharts","highstock","annotations"],"author":{"name":"Black Label","email":"start@blacklabel.pl","url":"http://blacklabel.pl"},"license":"SEE LICENSE IN license.txt","bugs":{"url":"https://github.com/blacklabel/annotations/issues"},"homepage":"https://github.com/blacklabel/annotations#readme","files":["js/annotations.js"],"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0"},"gitHead":"1ea1c968470f3a59948a217e268f48b87779cf85","_id":"highcharts-annotations@1.3.0","scripts":{},"_shasum":"a0ab25abc0742038e803a7cd80c3c91e4a930e9d","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.0","_npmUser":{"name":"blacklabel","email":"start@blacklabel.pl"},"dist":{"shasum":"a0ab25abc0742038e803a7cd80c3c91e4a930e9d","tarball":"https://registry.npmjs.org/highcharts-annotations/-/highcharts-annotations-1.3.0.tgz","integrity":"sha512-gT62Hr3DzqUhk1fAmcmFmLnEb7tkSWn060eOWDwQfVuGtR4GTJVVM9rXikz4PECckH5m2wnHAmyNlf3qL1v2iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHdIagCW0iz5kZugrAFWvFvLKr3TqsUNfwO+9FcvtdT3AiEAjfoOA98gaFQDMF/V9plByqmLzykQCBqQStEhpow/HAU="}]},"maintainers":[{"name":"blacklabel","email":"start@blacklabel.pl"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/highcharts-annotations-1.3.0.tgz_1466071022440_0.887376292143017"},"directories":{}},"1.3.1":{"name":"highcharts-annotations","version":"1.3.1","description":"Highcharts plugin to add dynamic annotations to charts.","main":"js/annotations.js","repository":{"type":"git","url":"git+https://github.com/blacklabel/annotations.git"},"keywords":["highcharts","highstock","annotations"],"author":{"name":"Black Label","email":"start@blacklabel.pl","url":"http://blacklabel.pl"},"license":"SEE LICENSE IN license.txt","bugs":{"url":"https://github.com/blacklabel/annotations/issues"},"homepage":"https://github.com/blacklabel/annotations#readme","files":["js/annotations.js"],"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0"},"gitHead":"96bf27cbb34556521a5161db728d514b59cf4721","_id":"highcharts-annotations@1.3.1","scripts":{},"_shasum":"df50fcfadad5de10e56280a33751c85b96fb6f21","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"blacklabel","email":"start@blacklabel.pl"},"dist":{"shasum":"df50fcfadad5de10e56280a33751c85b96fb6f21","tarball":"https://registry.npmjs.org/highcharts-annotations/-/highcharts-annotations-1.3.1.tgz","integrity":"sha512-SjUyltFzcrkmJUTcjN3Zu31fbYiaBdivvmPIXG+f3PRctakkec/R/8AF3NpjB6AF9eU81Lvs6eu0xO/gUTQuzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyzG0ZIpSMsx7jEng8kGij0q04OO8aHOGE+wpFP2LelQIhAPiOT9u9idf7uYGf3iOcnNX7TlUqY+qer4E1FpL8XJFt"}]},"maintainers":[{"name":"blacklabel","email":"start@blacklabel.pl"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/highcharts-annotations-1.3.1.tgz_1477482868474_0.5492794550955296"},"directories":{}},"1.3.3":{"name":"highcharts-annotations","version":"1.3.3","description":"Highcharts plugin to add dynamic annotations to charts.","main":"js/annotations.js","repository":{"type":"git","url":"git+https://github.com/blacklabel/annotations.git"},"keywords":["annotations","highcharts","highstock","highcharts-addon"],"author":{"name":"Black Label","email":"start@blacklabel.pl","url":"http://blacklabel.pl"},"license":"SEE LICENSE IN license.txt","bugs":{"url":"https://github.com/blacklabel/annotations/issues"},"homepage":"https://github.com/blacklabel/annotations#readme","files":["js/annotations.js"],"devDependencies":{"gulp":"^3.9.1","gulp-eslint":"^2.0.0"},"gitHead":"d5dfa2761321c0ffdfa386caa2c31d37fff10476","_id":"highcharts-annotations@1.3.3","_npmVersion":"5.3.0","_nodeVersion":"7.10.0","_npmUser":{"name":"blacklabel","email":"start@blacklabel.pl"},"dist":{"integrity":"sha512-bfCBBhxRhNDLpJmUEclvBiy0n1MUK1YmPkk/EEHWAaqmrHufk00SE4AiYKC+6LaYyYEekixaP3JoHADmo8R7IA==","shasum":"a9133e1d8d8e35783f4113e7dad68dbb199a148e","tarball":"https://registry.npmjs.org/highcharts-annotations/-/highcharts-annotations-1.3.3.tgz","fileCount":4,"unpackedSize":58040,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpA6NfhitXDgVUe2jUqrT2Z/o5O2HhtxxnExiNnL2+tgIgSDyUrRT0GWVj4s1N8vYBZ/Ig5m9bMf5olQeN0cI/8N0="}]},"maintainers":[{"name":"blacklabel","email":"start@blacklabel.pl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/highcharts-annotations_1.3.3_1522154785442_0.3139775021130835"},"_hasShrinkwrap":false}},"readme":"### ![#f03c15](https://placehold.it/15/f03c15/000000?text=+) Annotations are a part of Highstock 6+ and Highcharts 6+ as a module. This plugin was build for older versions of Highstock.\n\n<h1>Annotations module</h1>\n\n<p><div class=\"info\">If you're interested in adding new features or modifying existing ones, please contact us: <a href=\"mailto:start@blacklabel.pl\"> start@blacklabel.pl </a><br>\nYou may also want to check our other demo here: <a href=\"http://demo.blacklabel.pl\">http://demo.blacklabel.pl</a>.</div></p>\n\n<h2>Installation</h2>\n\n<p>Like any other Highcharts module (e.g. exporting), add <code>&lt;script&gt;</code> tag pointing to <code>annotations.js</code> below Highcharts script tag.</p>\n\n<p>For NPM users:</p>\n<pre><code>var Highcharts = require('highcharts'),\n    HighchartsAnnotations = require('annotations')(Highcharts);</code></pre>\n<p>For BOWER users:</p>\n<pre><code>bower install highcharts-annotations</code></pre>\n\n<h2>Sample code</h2>\n\n<pre><code>new Highcharts.Chart({\n  chart: {\n    renderTo: container\n  },\n  series: [{\n      data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0]\n  }],\n  annotations: [{\n    xValue: 4,\n    yValue: 125,\n    title: {\n        text: \"Annotated chart!\"\n    },\n    events: {\n        click: function(e) { console.log(\"Annotation clicked:\", this); }\n    }\n  }]\n})\n</code></pre>\n\n<h2>Available options</h2>\n\n<h3>Chart options</h3>\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">Option            </th>\n<th align=\"left\"> Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\">chart.annotations </td>\n<td align=\"left\"> Array containing annotation configuration objects</td>\n</tr>\n<tr>\n<td align=\"left\">chart.annotationsOptions </td>\n<td align=\"left\"> Default options for annotations (like buttons' list)</td>\n</tr>\n</tbody>\n</table>\n\n\n<h3>Annotation configuration object</h3>\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">Option                                    </th>\n<th align=\"left\"> Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\">x<br>y                                    </td>\n<td align=\"left\"> Annotation position defined in pixels</td>\n</tr>\n<tr>\n<td align=\"left\">xValue<br>yValue                          </td>\n<td align=\"left\"> Annotation position defined using axis values</td>\n</tr>\n<tr>\n<td align=\"left\">xValueEnd<br>yValueEnd                          </td>\n<td align=\"left\"> Path only. Instead of defining path, set these values to make annotation scalable</td>\n</tr>\n<tr>\n<td align=\"left\">xAxis<br>yAxis                            </td>\n<td align=\"left\"> Axis index, default to 0</td>\n</tr>\n<tr>\n<td align=\"left\">anchorX<br>anchorY                        </td>\n<td align=\"left\"> Defines annotation anchor point, available values:<br><pre>anchorX: \"left\"/\"center\"/\"right\"</pre><br><pre>anchorY: \"top\"/\"middle\"/\"bottom\"</pre></td>\n</tr>\n<tr>\n<td align=\"left\">allowDragX<br>allowDragY</td>\n<td align=\"left\"> Allow user to drag and drop an annotation. Horizontal and vertical.</td>\n</tr>\n<tr>\n<td align=\"left\">linkedTo                                  </td>\n<td align=\"left\"> Link annotation to point or series using it's id</td>\n</tr>\n<tr>\n<td align=\"left\">title                                     </td>\n<td align=\"left\"> Title configuration object</td>\n</tr>\n<tr>\n<td align=\"left\">title.text                                </td>\n<td align=\"left\"> Title text</td>\n</tr>\n<tr>\n<td align=\"left\">title.x<br>title.y                        </td>\n<td align=\"left\"> Title position in pixels, relative to annotation position</td>\n</tr>\n<tr>\n<td align=\"left\">title.style                               </td>\n<td align=\"left\"> Additional CSS styles for title</td>\n</tr>\n<tr>\n<td align=\"left\">title.style.color                         </td>\n<td align=\"left\"> Title text color</td>\n</tr>\n<tr>\n<td align=\"left\">title.style.fontSize                      </td>\n<td align=\"left\"> Title font size</td>\n</tr>\n<tr>\n<td align=\"left\">shape                                     </td>\n<td align=\"left\"> Shape configuration object</td>\n</tr>\n<tr>\n<td align=\"left\">shape.type                                </td>\n<td align=\"left\"> Shape type, available types are <code>\"path\"</code>, <code>\"circle\"</code> and <code>\"rect\"</code></td>\n</tr>\n<tr>\n<td align=\"left\">shape.units                               </td>\n<td align=\"left\"> Defines whether shape uses pixels or axis values</td>\n</tr>\n<tr>\n<td align=\"left\">shape.params                              </td>\n<td align=\"left\"> Shape parameters (parameters are passed to renderer method like rect, circle or path)</td>\n</tr>\n<tr>\n<td align=\"left\"> events                              </td>\n<td align=\"left\"> Object of events, supported are: <code>mouseover, mouseout, mousedown, mouseup, click, dblclick</code>. <code>this</code> in a callback refers to the annotation object.</td>\n</tr>\n<tr>\n<td align=\"left\"> selectionMarker                              </td>\n<td align=\"left\"> Styles for a selected annotation, defaults to: \n<code>{\n\t\t'stroke-width': 1,\n\t\tstroke: 'black',\n\t\tfill: 'transparent',\n\t\tdashstyle: 'ShortDash',\n\t\t'shape-rendering': 'crispEdges'\n}</code></td>\n</tr>\n</tbody>\n</table>\n\n\n<h3>Available shape parameters</h3>\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">Option                                      </th>\n<th align=\"left\"> Description                                        </th>\n<th align=\"left\"> Limited to</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\">shape.params.x<br>shape.params.y             </td>\n<td align=\"left\"> Shape position relative to the annotation position </td>\n<td align=\"left\">rect<br>circle</td>\n</tr>\n<tr>\n<td align=\"left\">shape.params.width<br>shape.params.height    </td>\n<td align=\"left\"> Rectangle width and height (only for <code>\"rect\"</code> type)  </td>\n<td align=\"left\"> rect</td>\n</tr>\n<tr>\n<td align=\"left\">shape.params.d                               </td>\n<td align=\"left\"> Path definition (only for <code>\"path\"</code> type)             </td>\n<td align=\"left\"> path</td>\n</tr>\n<tr>\n<td align=\"left\">shape.params.r                               </td>\n<td align=\"left\"> Circle radius                                      </td>\n<td align=\"left\"> circle</td>\n</tr>\n<tr>\n<td align=\"left\">shape.params.fill                            </td>\n<td align=\"left\"> Fill color, default: <code>\"transparent\"</code>                  </td>\n<td align=\"left\"> -</td>\n</tr>\n<tr>\n<td align=\"left\">shape.params.stroke                          </td>\n<td align=\"left\"> Stroke color, default: <code>\"black\"</code>                       </td>\n<td align=\"left\"> -</td>\n</tr>\n<tr>\n<td align=\"left\">shape.params.strokeWidth                     </td>\n<td align=\"left\"> Stroke width (and line width for path), default: <code>2</code> </td>\n<td align=\"left\"> -</td>\n</tr>\n</tbody>\n</table>\n\n\n<h3>Chart.annotations</h3>\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">Property                       </th>\n<th align=\"left\"> Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\">chart.addAnnotation(options) </td>\n<td align=\"left\"> Add one annotation with given options</td>\n</tr>\n<tr>\n<td align=\"left\">chart.redrawAnnotations()     </td>\n<td align=\"left\"> Redraw all annotations</td>\n</tr>\n<tr>\n<td align=\"left\">chart.annotations.allItems     </td>\n<td align=\"left\"> Array containing all annotations</td>\n</tr>\n</tbody>\n</table>\n\n\n<h3>Annotation object</h3>\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">Property                   </th>\n<th align=\"left\"> Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\">annotation.update(options) </td>\n<td align=\"left\"> Update an annotation with given options</td>\n</tr>\n<tr>\n<td align=\"left\">annotation.destroy()       </td>\n<td align=\"left\"> Destroy an annotation</td>\n</tr>\n<tr>\n<td align=\"left\">annotation.show()</td>\n<td align=\"left\"> Show an annotation - only for non-linked annotations</td>\n</tr>\n<tr>\n<td align=\"left\">annotation.hide()</td>\n<td align=\"left\"> Hide an annotation - only for non-linked annotations</td>\n</tr>\n<tr>\n<td align=\"left\">annotation.select()</td>\n<td align=\"left\"> Select an annotation by adding selection box</td>\n</tr>\n<tr>\n<td align=\"left\">annotation.deselect()</td>\n<td align=\"left\"> Deselect an annotation by removing selection box</td>\n</tr>\n</tbody>\n</table>\n\n<h3>Chart.annotationsOptions</h3>\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">Property                   </th>\n<th align=\"left\"> Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\"> enabledButtons </td>\n<td align=\"left\"> Enable or disable buttons for drawing annotations. <br>\nSelected button prevents from zooming and panning to draw annotation. </td>\n</tr>\n<tr>\n<td align=\"left\"> buttonsOffsets </td>\n<td align=\"left\"> Offsets for the buttons in array: <code>[x-offset, y-offset]</code>. Useful when placing annotations next to the exporting module, etc. Defaults to <code>[0, 0]</code>. </td>\n</tr>\n<tr>\n<td align=\"left\"> buttons      </td>\n<td align=\"left\"> Array of buttons. For example: \n<pre>{\n\tannotationEvents: {\n\t\tstep: callback, // to be called during mouse drag for new annotation\n\t\tstop: callback  // to be called after mouse up / release\n\t},\n\tannotation: { // standard annotation options, used for new annotation\n\t\tanchorX: 'left',\n\t\tanchorY: 'top',\n\t\txAxis: 0,\n\t\tyAxis: 0,\n\t\tshape: {\n\t\t\ttype: 'path',\n\t\t\tparams: {\n\t\t\t\td: ['M', 0, 0, 'L', 100, 100 ]\n\t\t\t}\n\t\t}\n\t},\n\tsymbol: { // button symbol options\n\t\tshape: 'rect', // shape, taken from Highcharts.symbols\n\t\tsize: 12,\n\t\tstyle: {\n\t\t\t'stroke-width':  2,\n\t\t\t'stroke': 'black',\n\t\t\tfill: 'red',\n\t\t\tzIndex: 121\n\t\t}\n\t},\n\tstyle: { // buton style itself\n\t\tfill: 'black',\n\t\tstroke: 'blue',\n\t\tstrokeWidth: 2,\n\t},\n\tsize: 12, // buton size\n\tstates: { // states for button \n\t\tselected: {\n\t\t\tfill: '#9BD'\n\t\t},\n\t\thover: {\n\t\t\tfill: '#9BD'\n\t\t}\n\t}\n}</pre></td>\n</tr>\n</tbody>\n</table>\n\n\n<h2>Advanced demo</h2>\n\n\n<div>Go to project page to see this module in action: http://blacklabel.github.io/annotations/</div>\n\n","maintainers":[{"name":"blacklabel","email":"start@blacklabel.pl"}],"time":{"modified":"2022-06-18T20:40:10.723Z","created":"2016-06-16T09:57:04.947Z","1.3.0":"2016-06-16T09:57:04.947Z","1.3.1":"2016-10-26T11:54:30.682Z","1.3.3":"2018-03-27T12:46:25.556Z"},"homepage":"https://github.com/blacklabel/annotations#readme","keywords":["annotations","highcharts","highstock","highcharts-addon"],"repository":{"type":"git","url":"git+https://github.com/blacklabel/annotations.git"},"author":{"name":"Black Label","email":"start@blacklabel.pl","url":"http://blacklabel.pl"},"bugs":{"url":"https://github.com/blacklabel/annotations/issues"},"license":"SEE LICENSE IN license.txt","readmeFilename":"README.md"}