|
| 1 | +/** |
| 2 | +* Copyright 2012-2016, Plotly, Inc. |
| 3 | +* All rights reserved. |
| 4 | +* |
| 5 | +* This source code is licensed under the MIT license found in the |
| 6 | +* LICENSE file in the root directory of this source tree. |
| 7 | +*/ |
| 8 | + |
| 9 | +'use strict'; |
| 10 | + |
| 11 | +var scatterglAttrs = require('../scattergl/attributes'); |
| 12 | + |
| 13 | +module.exports = { |
| 14 | + x: scatterglAttrs.x, |
| 15 | + y: scatterglAttrs.y, |
| 16 | + xy: { |
| 17 | + valType: 'data_array', |
| 18 | + description: [ |
| 19 | + 'Faster alternative to specifying `x` and `y` separately.', |
| 20 | + 'If supplied, it must be a typed `Float32Array` array that', |
| 21 | + 'represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]`' |
| 22 | + ].join(' ') |
| 23 | + }, |
| 24 | + indexid: { |
| 25 | + valType: 'data_array', |
| 26 | + description: [ |
| 27 | + 'A sequential value, 0..n, supply it to avoid creating this array inside plotting.', |
| 28 | + 'Its length must be equal to or greater than the number of points.', |
| 29 | + 'For the best performance and memory use, create one large `indexid` typed array', |
| 30 | + 'that is guaranteed to be at least as long as the largest number of points during', |
| 31 | + 'use, and reuse it on each `Plotly.restyle()` call.' |
| 32 | + ].join(' ') |
| 33 | + }, |
| 34 | + bounds: { |
| 35 | + valType: 'data_array', |
| 36 | + description: [ |
| 37 | + 'Specify `bounds` in the shape of `[xMin, yMin, xMax, yMax] to avoid looping through', |
| 38 | + 'the `xy` typed array.' |
| 39 | + ].join(' ') |
| 40 | + }, |
| 41 | + text: scatterglAttrs.text, |
| 42 | + marker: { |
| 43 | + color: { |
| 44 | + valType: 'color', |
| 45 | + arrayOk: false, |
| 46 | + role: 'style', |
| 47 | + description: [ |
| 48 | + 'Sets the marker fill color. It accepts a specific color.', |
| 49 | + 'If the color is not fully opaque and there are hundreds of thousands', |
| 50 | + 'of points, it may cause slower zooming and panning.' |
| 51 | + ].join('') |
| 52 | + }, |
| 53 | + opacity: { |
| 54 | + valType: 'number', |
| 55 | + min: 0, |
| 56 | + max: 1, |
| 57 | + dflt: 1, |
| 58 | + arrayOk: false, |
| 59 | + role: 'style', |
| 60 | + description: [ |
| 61 | + 'Sets the marker opacity. The default value is `1` (fully opaque).', |
| 62 | + 'If the markers are not fully opaque and there are hundreds of thousands', |
| 63 | + 'of points, it may cause slower zooming and panning.', |
| 64 | + 'Opacity fades the color even if `blend` is left on `false` even if there', |
| 65 | + 'is no translucency effect in that case.' |
| 66 | + ].join(' ') |
| 67 | + }, |
| 68 | + blend: { |
| 69 | + valType: 'boolean', |
| 70 | + dflt: false, |
| 71 | + role: 'style', |
| 72 | + description: [ |
| 73 | + 'Determines if colors are blended together for a translucency effect', |
| 74 | + 'in case `opacity` is specified as a value less then `1`.', |
| 75 | + 'Setting `blend` to `true` reduces zoom/pan', |
| 76 | + 'speed if used with large numbers of points.' |
| 77 | + ].join(' ') |
| 78 | + }, |
| 79 | + sizemin: { |
| 80 | + valType: 'number', |
| 81 | + min: 0.1, |
| 82 | + max: 2, |
| 83 | + dflt: 0.5, |
| 84 | + role: 'style', |
| 85 | + description: [ |
| 86 | + 'Sets the minimum size (in px) of the rendered marker points, effective when', |
| 87 | + 'the `pointcloud` shows a million or more points.' |
| 88 | + ].join(' ') |
| 89 | + }, |
| 90 | + sizemax: { |
| 91 | + valType: 'number', |
| 92 | + min: 0.1, |
| 93 | + dflt: 20, |
| 94 | + role: 'style', |
| 95 | + description: [ |
| 96 | + 'Sets the maximum size (in px) of the rendered marker points.', |
| 97 | + 'Effective when the `pointcloud` shows only few points.' |
| 98 | + ].join(' ') |
| 99 | + }, |
| 100 | + border: { |
| 101 | + color: { |
| 102 | + valType: 'color', |
| 103 | + arrayOk: false, |
| 104 | + role: 'style', |
| 105 | + description: [ |
| 106 | + 'Sets the stroke color. It accepts a specific color.', |
| 107 | + 'If the color is not fully opaque and there are hundreds of thousands', |
| 108 | + 'of points, it may cause slower zooming and panning.' |
| 109 | + ].join(' ') |
| 110 | + }, |
| 111 | + arearatio: { |
| 112 | + valType: 'number', |
| 113 | + min: 0, |
| 114 | + max: 1, |
| 115 | + dflt: 0, |
| 116 | + role: 'style', |
| 117 | + description: [ |
| 118 | + 'Specifies what fraction of the marker area is covered with the', |
| 119 | + 'border.' |
| 120 | + ].join(' ') |
| 121 | + } |
| 122 | + } |
| 123 | + } |
| 124 | +}; |
0 commit comments