Skip to content

Commit

Permalink
Add indexedScale to website
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsoco committed Nov 18, 2020
1 parent 5e353e5 commit 15106c2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
31 changes: 31 additions & 0 deletions website/src/data/components/bar/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,37 @@ const props = [
],
},
},
{
key: 'indexedScale',
type: 'object',
group: 'Base',
help: `indexed scale configuration.`,
defaultValue: defaults.indexedScale,
controlType: 'object',
controlOptions: {
props: [
{
key: 'type',
help: `Scale type.`,
type: 'string',
controlType: 'choices',
controlOptions: {
disabled: true,
choices: ['indexed'].map(v => ({
label: v,
value: v,
})),
},
},
{
key: 'round',
help: 'Toggle indexed scale (for bar width) rounding.',
type: 'boolean',
controlType: 'switch',
},
],
},
},
{
key: 'reverse',
help:
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/bar/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const BarApi = () => {
reverse: false,

valueScale: { type: 'linear' },
indexedScale: { type: 'indexed', round: false },

axisTop: {
enable: false,
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/bar/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const initialProperties = {
reverse: false,

valueScale: { type: 'linear' },
indexedScale: { type: 'indexed', round: false },

colors: { scheme: 'red_blue' },
colorBy: 'id',
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const initialProperties = {
reverse: false,

valueScale: { type: 'linear' },
indexedScale: { type: 'indexed', round: false },

colors: { scheme: 'nivo' },
colorBy: 'id',
Expand Down

0 comments on commit 15106c2

Please sign in to comment.