Skip to content

Commit

Permalink
Merge pull request #366 from plotly/colorscale-descriptions
Browse files Browse the repository at this point in the history
🎎 Clarify color attribute descriptions
  • Loading branch information
mdtusz committed Mar 30, 2016
2 parents 826ed94 + 58d215b commit 6460fb8
Showing 1 changed file with 37 additions and 10 deletions.
47 changes: 37 additions & 10 deletions src/traces/scatter/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,12 @@ module.exports = {
valType: 'color',
arrayOk: true,
role: 'style',
description: 'Sets the marker color.'
description: [
'Sets the marker color. It accepts either a specific color',
'or an array of values that are mapped to the colorscale',
'relative to the max and min values of the array or relative to',
'`cmin` and `cmax` if set.'
].join(' ')
},
maxdisplayed: {
valType: 'number',
Expand Down Expand Up @@ -247,15 +252,16 @@ module.exports = {
valType: 'colorscale',
role: 'style',
description: [
'Sets the colorscale.',
'Sets the colorscale and only has an effect',
'if `marker.color` is set to a numerical array.',
'The colorscale must be an array containing',
'arrays mapping a normalized value to an',
'rgb, rgba, hex, hsl, hsv, or named color string.',
'At minimum, a mapping for the lowest (0) and highest (1)',
'values are required. For example,',
'`[[0, \'rgb(0,0,255)\', [1, \'rgb(255,0,0)\']]`.',
'To control the bounds of the colorscale in color space,',
'use cmin and cmax'
'use `marker.cmin` and `marker.cmax`.'
].join(' ')
},
cauto: {
Expand All @@ -274,7 +280,9 @@ module.exports = {
role: 'info',
description: [
'Has only an effect if `marker.color` is set to a numerical array.',
'Sets the upper bound of the color domain.'
'Sets the upper bound of the color domain.',
'Value should be associated to the `marker.color` array index,',
'and if set, `marker.cmin` must be set as well.'
].join(' ')
},
cmin: {
Expand All @@ -283,7 +291,9 @@ module.exports = {
role: 'info',
description: [
'Has only an effect if `marker.color` is set to a numerical array.',
'Sets the lower bound of the color domain.'
'Sets the lower bound of the color domain.',
'Value should be associated to the `marker.color` array index,',
'and if set, `marker.cmax` must be set as well.'
].join(' ')
},
autocolorscale: {
Expand Down Expand Up @@ -319,7 +329,12 @@ module.exports = {
valType: 'color',
arrayOk: true,
role: 'style',
description: 'Sets the color of the lines bounding the marker points.'
description: [
'Sets the marker outline color. It accepts either a specific color',
'or an array of values that are mapped to the colorscale',
'relative to the max and min values of the array or relative to',
'`cmin` and `cmax` if set.'
].join(' ')
},
width: {
valType: 'number',
Expand All @@ -332,8 +347,16 @@ module.exports = {
valType: 'colorscale',
role: 'style',
description: [
'Has only an effect if `marker.line.color` is set to a numerical array.',
'Sets the colorscale.'
'Sets the colorscale and only has an effect',
'if `marker.line.color` is set to a numerical array.',
'The colorscale must be an array containing',
'arrays mapping a normalized value to an',
'rgb, rgba, hex, hsl, hsv, or named color string.',
'At minimum, a mapping for the lowest (0) and highest (1)',
'values are required. For example,',
'`[[0, \'rgb(0,0,255)\', [1, \'rgb(255,0,0)\']]`.',
'To control the bounds of the colorscale in color space,',
'use `marker.line.cmin` and `marker.line.cmax`.'
].join(' ')
},
cauto: {
Expand All @@ -352,7 +375,9 @@ module.exports = {
role: 'info',
description: [
'Has only an effect if `marker.line.color` is set to a numerical array.',
'Sets the upper bound of the color domain.'
'Sets the upper bound of the color domain.',
'Value should be associated to the `marker.line.color` array index,',
'and if set, `marker.line.cmin` must be set as well.'
].join(' ')
},
cmin: {
Expand All @@ -361,7 +386,9 @@ module.exports = {
role: 'info',
description: [
'Has only an effect if `marker.line.color` is set to a numerical array.',
'Sets the lower bound of the color domain.'
'Sets the lower bound of the color domain.',
'Value should be associated to the `marker.line.color` array index,',
'and if set, `marker.line.cmax` must be set as well.'
].join(' ')
},
autocolorscale: {
Expand Down

0 comments on commit 6460fb8

Please sign in to comment.