Skip to content

Commit

Permalink
🔨 slightly more interesting crude example
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 committed Jan 3, 2025
1 parent 2585776 commit 8a627e2
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions site/DataPageV2Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,28 @@ export const DataPageV2Content = ({
grapher1State.inputTable = inputTable
grapher2State.inputTable = inputTable
}
console.log(
"focused entity",
(grapher2State.chartInstance as MapChart).focusEntity
)
console.log(
"chart projection",
(grapher2State.chartInstance as MapChart).projection
)
reaction(
() => grapher2State.yAxis.scaleType,
() => (grapher2State.chartInstance as MapChart).projection,
() => {
console.log("rerunning reaction")
console.log(
"rerunning reaction",
(grapher2State.chartInstance as MapChart).projection
)

// const focusedEntity = (
// grapher2State.chartInstance as MapChart
// ).focusEntity?.id
// if (focusedEntity)
// grapher1State.selection.addToSelection([
// focusedEntity.toString(),
// ])
grapher1State.yAxis.scaleType =
grapher2State.yAxis.scaleType
const focusedEntity = (
grapher2State.chartInstance as MapChart
).projection
grapher1State.selection.clearSelection()
if (focusedEntity)
grapher1State.selection.addToSelection([projection])

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / bundlewatch

Cannot find name 'projection'. Did you mean 'reaction'?

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / testdbcheck

Cannot find name 'projection'. Did you mean 'reaction'?

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / testdbcheck

Cannot find name 'projection'. Did you mean 'reaction'?

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / bundlewatch

Cannot find name 'projection'. Did you mean 'reaction'?

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / bundlewatch

Cannot find name 'projection'. Did you mean 'reaction'?

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / testcheck

Cannot find name 'projection'. Did you mean 'reaction'?

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / testdbcheck

Cannot find name 'projection'. Did you mean 'reaction'?

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / testcheck

Cannot find name 'projection'. Did you mean 'reaction'?

Check failure on line 157 in site/DataPageV2Content.tsx

View workflow job for this annotation

GitHub Actions / testcheck

Cannot find name 'projection'. Did you mean 'reaction'?
}
)
}
Expand Down

0 comments on commit 8a627e2

Please sign in to comment.