|
| 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 extendFlat = require('../../lib/extend').extendFlat; |
| 12 | +var fontAttrs = require('../../plots/font_attributes'); |
| 13 | +var colorAttrs = require('../../components/color/attributes'); |
| 14 | + |
| 15 | +module.exports = { |
| 16 | + showlabels: { |
| 17 | + valType: 'enumerated', |
| 18 | + values: ['start', 'end', 'both', 'none'], |
| 19 | + dflt: 'end', |
| 20 | + role: 'style', |
| 21 | + description: [ |
| 22 | + 'Determines whether axis labels are drawn on the low side,', |
| 23 | + 'the high side, both, or neither side of the axis.' |
| 24 | + ] |
| 25 | + }, |
| 26 | + labelpadding: { |
| 27 | + valType: 'integer', |
| 28 | + role: 'style', |
| 29 | + dflt: 10, |
| 30 | + description: 'Extra padding between label and the axis' |
| 31 | + }, |
| 32 | + labelprefix: { |
| 33 | + valType: 'string', |
| 34 | + role: 'style', |
| 35 | + description: 'Sets a axis label prefix.' |
| 36 | + }, |
| 37 | + labelsuffix: { |
| 38 | + valType: 'string', |
| 39 | + dflt: '', |
| 40 | + role: 'style', |
| 41 | + description: 'Sets a axis label suffix.' |
| 42 | + }, |
| 43 | + showstartlabel: { |
| 44 | + valType: 'boolean', |
| 45 | + dflt: true, |
| 46 | + }, |
| 47 | + showendlabel: { |
| 48 | + valType: 'boolean', |
| 49 | + dflt: true, |
| 50 | + }, |
| 51 | + showlabelprefix: { |
| 52 | + valType: 'enumerated', |
| 53 | + values: ['all', 'first', 'last', 'none'], |
| 54 | + dflt: 'all', |
| 55 | + role: 'style', |
| 56 | + description: [ |
| 57 | + 'If *all*, all tick labels are displayed with a prefix.', |
| 58 | + 'If *first*, only the first tick is displayed with a prefix.', |
| 59 | + 'If *last*, only the last tick is displayed with a suffix.', |
| 60 | + 'If *none*, tick prefixes are hidden.' |
| 61 | + ].join(' ') |
| 62 | + }, |
| 63 | + showlabelsuffix: { |
| 64 | + valType: 'enumerated', |
| 65 | + values: ['all', 'first', 'last', 'none'], |
| 66 | + dflt: 'all', |
| 67 | + role: 'style', |
| 68 | + description: 'Same as `showtickprefix` but for tick suffixes.' |
| 69 | + }, |
| 70 | + labelfont: extendFlat({}, fontAttrs, { |
| 71 | + description: 'Sets the label font.' |
| 72 | + }), |
| 73 | + gridoffset: { |
| 74 | + valType: 'integer', |
| 75 | + min: 0, |
| 76 | + dflt: 0, |
| 77 | + role: 'info', |
| 78 | + description: 'The starting index of grid lines along the axis' |
| 79 | + }, |
| 80 | + gridstep: { |
| 81 | + valType: 'integer', |
| 82 | + min: 1, |
| 83 | + dflt: 1, |
| 84 | + role: 'info', |
| 85 | + description: 'The stride between grid lines along the axis' |
| 86 | + }, |
| 87 | + gridwidth: { |
| 88 | + valType: 'number', |
| 89 | + min: 0, |
| 90 | + dflt: 1, |
| 91 | + role: 'style', |
| 92 | + description: 'Sets the width (in px) of the grid lines.' |
| 93 | + }, |
| 94 | + gridcolor: { |
| 95 | + valType: 'color', |
| 96 | + dflt: colorAttrs.defaultLine, |
| 97 | + role: 'style', |
| 98 | + description: 'Sets the color of the grid lines.' |
| 99 | + }, |
| 100 | + minorgridoffset: { |
| 101 | + valType: 'integer', |
| 102 | + min: 0, |
| 103 | + dflt: 0, |
| 104 | + role: 'info', |
| 105 | + description: 'The starting index of grid lines along the axis' |
| 106 | + }, |
| 107 | + minorgridstep: { |
| 108 | + valType: 'integer', |
| 109 | + min: 1, |
| 110 | + dflt: 1, |
| 111 | + role: 'info', |
| 112 | + description: 'The stride between grid lines along the axis' |
| 113 | + }, |
| 114 | + minorgridwidth: { |
| 115 | + valType: 'number', |
| 116 | + min: 0, |
| 117 | + dflt: 1, |
| 118 | + role: 'style', |
| 119 | + description: 'Sets the width (in px) of the grid lines.' |
| 120 | + }, |
| 121 | + minorgridcolor: { |
| 122 | + valType: 'color', |
| 123 | + dflt: colorAttrs.lightLine, |
| 124 | + role: 'style', |
| 125 | + description: 'Sets the color of the grid lines.' |
| 126 | + }, |
| 127 | +}; |
0 commit comments