-
Notifications
You must be signed in to change notification settings - Fork 13
/
nvd3-bullet.html
64 lines (55 loc) · 1.23 KB
/
nvd3-bullet.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="nvd3-behavior.html">
<!--
An element to create bullet chart using nvd3.
Example:
<nvd3-bullet data="[[data]]" auto-resize></nvd3-bullet>
Data Format:
```
{
"title": "Revenue",
"subtitle": "US$, in thousands",
"ranges": [150,225,300],
"measures": [220],
"markers": [250]
}
```
@group NVD3 Elements
@element nvd3-bullet
@demo demo/nvd3-bullet.html
@hero hero.svg
-->
<dom-module id="nvd3-bullet">
<template>
<style include="nvd3-shared-styles"></style>
<!-- We need to put svg tag inside a div to set correct margins -->
<div>
<svg id="svg"></svg>
</div>
</template>
<script>
Polymer({
is: 'nvd3-bullet',
behaviors: [NVD3.ChartBehavior],
properties: {
/**
* NVD3 chart object.
*/
_chart: {
type: Object,
value: function() {
return nv.models.bulletChart();
}
},
/**
* NVD3 components which are used in this chart.
* It's required for binding events.
*/
_components: {
type: Array,
value: ['bullet', 'tooltip']
}
}
});
</script>
</dom-module>