forked from plotly/plotly.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaxis_attributes.js
114 lines (109 loc) · 3.36 KB
/
axis_attributes.js
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/**
* Copyright 2012-2016, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var axesAttrs = require('../../cartesian/layout_attributes');
var extendFlat = require('../../../lib/extend').extendFlat;
module.exports = {
showspikes: {
valType: 'boolean',
role: 'info',
dflt: true,
description: [
'Sets whether or not spikes starting from',
'data points to this axis\' wall are shown on hover.'
].join(' ')
},
spikesides: {
valType: 'boolean',
role: 'info',
dflt: true,
description: [
'Sets whether or not spikes extending from the',
'projection data points to this axis\' wall boundaries',
'are shown on hover.'
].join(' ')
},
spikethickness: {
valType: 'number',
role: 'style',
min: 0,
dflt: 2,
description: 'Sets the thickness (in px) of the spikes.'
},
spikecolor: {
valType: 'color',
role: 'style',
dflt: 'rgb(0,0,0)',
description: 'Sets the color of the spikes.'
},
showbackground: {
valType: 'boolean',
role: 'info',
dflt: false,
description: [
'Sets whether or not this axis\' wall',
'has a background color.'
].join(' ')
},
backgroundcolor: {
valType: 'color',
role: 'style',
dflt: 'rgba(204, 204, 204, 0.5)',
description: 'Sets the background color of this axis\' wall.'
},
showaxeslabels: {
valType: 'boolean',
role: 'info',
dflt: true,
description: 'Sets whether or not this axis is labeled'
},
color: axesAttrs.color,
categoryorder: axesAttrs.categoryorder,
categoryarray: axesAttrs.categoryarray,
title: axesAttrs.title,
titlefont: axesAttrs.titlefont,
type: axesAttrs.type,
autorange: axesAttrs.autorange,
rangemode: axesAttrs.rangemode,
range: axesAttrs.range,
fixedrange: axesAttrs.fixedrange,
// ticks
tickmode: axesAttrs.tickmode,
nticks: axesAttrs.nticks,
tick0: axesAttrs.tick0,
dtick: axesAttrs.dtick,
tickvals: axesAttrs.tickvals,
ticktext: axesAttrs.ticktext,
ticks: axesAttrs.ticks,
mirror: axesAttrs.mirror,
ticklen: axesAttrs.ticklen,
tickwidth: axesAttrs.tickwidth,
tickcolor: axesAttrs.tickcolor,
showticklabels: axesAttrs.showticklabels,
tickfont: axesAttrs.tickfont,
tickangle: axesAttrs.tickangle,
tickprefix: axesAttrs.tickprefix,
showtickprefix: axesAttrs.showtickprefix,
ticksuffix: axesAttrs.ticksuffix,
showticksuffix: axesAttrs.showticksuffix,
showexponent: axesAttrs.showexponent,
exponentformat: axesAttrs.exponentformat,
tickformat: axesAttrs.tickformat,
hoverformat: axesAttrs.hoverformat,
// lines and grids
showline: axesAttrs.showline,
linecolor: axesAttrs.linecolor,
linewidth: axesAttrs.linewidth,
showgrid: axesAttrs.showgrid,
gridcolor: extendFlat({}, axesAttrs.gridcolor, // shouldn't this be on-par with 2D?
{dflt: 'rgb(204, 204, 204)'}),
gridwidth: axesAttrs.gridwidth,
zeroline: axesAttrs.zeroline,
zerolinecolor: axesAttrs.zerolinecolor,
zerolinewidth: axesAttrs.zerolinewidth
};