diff --git a/docs/showcases/cocoa/main.js b/docs/showcases/cocoa/main.js index 4d1642422..e7894c72d 100644 --- a/docs/showcases/cocoa/main.js +++ b/docs/showcases/cocoa/main.js @@ -78,6 +78,8 @@ const style = { } } +const firstStage = 6 + function stage(chart, i) { const palette = colors.slice(i - 1 > 0 ? i - 1 : 0, 8).join(' ') const prev2 = `Parties-${i + 2}` @@ -89,9 +91,9 @@ function stage(chart, i) { { config: { channels: { - y: { detach: [prev2] }, + y: { detach: i === firstStage ? [] : [prev2] }, x: { attach: [act] }, - label: { detach: [prev2], attach: [prev] } + label: { detach: i === firstStage ? [] : [prev2], attach: i === firstStage ? [] : [prev] } } } }, @@ -261,21 +263,20 @@ chart.initializing } ) ) - .then((chart) => stage(chart, 6)) - .then((chart) => stage(chart, 5)) - .then((chart) => stage(chart, 4)) - .then((chart) => stage(chart, 3)) - .then((chart) => stage(chart, 2)) - .then((chart) => stage(chart, 1)) - .then((chart) => stage(chart, 0)) + .then((chart) => stage(chart, firstStage)) + .then((chart) => stage(chart, firstStage - 1)) + .then((chart) => stage(chart, firstStage - 2)) + .then((chart) => stage(chart, firstStage - 3)) + .then((chart) => stage(chart, firstStage - 4)) + .then((chart) => stage(chart, firstStage - 5)) + .then((chart) => stage(chart, firstStage - 6)) .then((chart) => chart.animate({ config: { channels: { - y: { detach: ['Parties-2', 'Parties-1'] }, - color: { detach: ['Parties-1'] }, + y: { detach: ['Parties-1'] }, label: { - detach: ['Parties-2', 'Parties-1'], + detach: ['Parties-1'], attach: ['Parties-0'] } } diff --git a/docs/showcases/friends/main.js b/docs/showcases/friends/main.js index 666828f10..c41d847cb 100644 --- a/docs/showcases/friends/main.js +++ b/docs/showcases/friends/main.js @@ -182,20 +182,20 @@ function slide(seid, actFilter) { config: { channels: { x: { - attach: ['name'], + set: ['name'], range: { min: 0, max: '102%' } }, y: { - attach: ['Lines', 'season'], + set: ['Lines', 'season'], range: { min: 0, max: 9.99999 } }, - color: { attach: ['season'] } + color: { set: ['season'] } }, title: seid }, diff --git a/docs/showcases/musicformats/main.js b/docs/showcases/musicformats/main.js index 01855880f..7d8fa5858 100644 --- a/docs/showcases/musicformats/main.js +++ b/docs/showcases/musicformats/main.js @@ -30,7 +30,7 @@ for (let year = 1973; year <= 2020; year++) { y: { set: ['Format'] }, x: { set: ['Revenue'] }, label: { set: ['Revenue'] }, - color: { attach: ['Format'] } + color: { set: ['Format'] } }, title: 'Music Revenue by Format - Year by Year', sort: 'byValue'