|
| 1 | + |
| 2 | +{{alias}}( [data,] [options] ) |
| 3 | + Returns a Unicode sparkline instance. |
| 4 | + |
| 5 | + The following chart types are supported: |
| 6 | + |
| 7 | + - column |
| 8 | + - line |
| 9 | + - tristate |
| 10 | + - up-down |
| 11 | + - win-loss |
| 12 | + |
| 13 | + The `data` argument takes precedence over the `data` option. |
| 14 | + |
| 15 | + Parameters |
| 16 | + ---------- |
| 17 | + data: ArrayLike|ndarray (optional) |
| 18 | + Chart data. |
| 19 | + |
| 20 | + options: Object (optional) |
| 21 | + Options. |
| 22 | + |
| 23 | + options.autoRender: boolean (optional) |
| 24 | + Boolean indicating whether to re-render on a 'change' event. Default: |
| 25 | + false. |
| 26 | + |
| 27 | + options.bufferSize: integer|null (optional) |
| 28 | + Data buffer size. If provided, data is kept in a first-in first-out |
| 29 | + (FIFO) buffer which cannot exceed the buffer size. Default: +infinity. |
| 30 | + |
| 31 | + options.data: ArrayLike|ndarray (optional) |
| 32 | + Chart data. |
| 33 | + |
| 34 | + options.description: string (optional) |
| 35 | + Chart description. |
| 36 | + |
| 37 | + options.infinities: boolean (optional) |
| 38 | + Boolean indicating whether to encode infinite values. Default: false. |
| 39 | + |
| 40 | + options.isDefined: Function (optional) |
| 41 | + An accessor function indicating whether a datum is defined. |
| 42 | + |
| 43 | + options.label: string (optional) |
| 44 | + Data label. |
| 45 | + |
| 46 | + options.type: string (optional) |
| 47 | + Chart type. Default: 'column'. |
| 48 | + |
| 49 | + options.yMax: number|null (optional) |
| 50 | + Maximum value of the y-axis domain. If `null`, the value is computed |
| 51 | + from the data. Default: null. |
| 52 | + |
| 53 | + options.yMin: number|null (optional) |
| 54 | + Minimum value of the y-axis domain. If `null`, the value is computed |
| 55 | + from the data. Default: null. |
| 56 | + |
| 57 | + Returns |
| 58 | + ------- |
| 59 | + chart: ColumnChart |
| 60 | + Column chart instance. |
| 61 | + |
| 62 | + chart.autoRender |
| 63 | + Rendering mode. If `true`, an instance renders on each 'change' event; |
| 64 | + otherwise, rendering must be triggered manually. |
| 65 | + |
| 66 | + chart.bufferSize |
| 67 | + Data buffer size. |
| 68 | + |
| 69 | + chart.description |
| 70 | + Chart description. |
| 71 | + |
| 72 | + chart.data |
| 73 | + Chart data. |
| 74 | + |
| 75 | + chart.label |
| 76 | + Data label. |
| 77 | + |
| 78 | + chart.infinities |
| 79 | + Indicates whether to encode infinite values. |
| 80 | + |
| 81 | + chart.isDefined() |
| 82 | + An accessor function which defines whether a datum is defined. This |
| 83 | + accessor is used to define how missing values are encoded. The default |
| 84 | + behavior is to ignore values which are `NaN`. |
| 85 | + |
| 86 | + chart.render() |
| 87 | + Renders a column chart sparkline. |
| 88 | + |
| 89 | + chart.type |
| 90 | + Chart type. |
| 91 | + |
| 92 | + chart.yMax |
| 93 | + Maximum value of the y-axis domain. If set to `null`, when accessed, the |
| 94 | + returned value is computed from the data. |
| 95 | + |
| 96 | + chart.yMin |
| 97 | + Minimum value of the y-axis domain. If set to `null`, when accessed, the |
| 98 | + returned value is computed from the data. |
| 99 | + |
| 100 | + Examples |
| 101 | + -------- |
| 102 | + > var data = [ 1.0, 5.0, 3.0, 2.0, 4.0, 4.0, 3.0 ]; |
| 103 | + > var chart = new {{alias}}( data ); |
| 104 | + > chart.render() |
| 105 | + '▁█▅▃▆▆▅' |
| 106 | + > chart.type = 'line'; |
| 107 | + > chart.render() |
| 108 | + '⡈⠑⠢⠔⠒⠒⠒' |
| 109 | + |
| 110 | + See Also |
| 111 | + -------- |
| 112 | + |
0 commit comments