Skip to content

Commit

Permalink
Merge pull request #1150 from nychealth/feature-chart-printer
Browse files Browse the repository at this point in the history
fix nocompare bug (again)
  • Loading branch information
mmontesanonyc authored Oct 22, 2024
2 parents aac90c5 + 00e6872 commit f241423
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions assets/js/data-explorer/comparisons.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,21 @@ const renderComparisonsChart = (
// ----------------------------------------------------------------------- //

let vegaSpec = vegaLite.compile(compspec2).spec // compile to Vega to set axis layers as non-interactive
// console.log(compspec2)
// console.log(vegaSpec)
console.log(compspec2)
console.log(vegaSpec)
vegaSpec.marks[3].interactive = false; // set text layers to non-interactive
vegaSpec.marks[4].interactive = false; // set axis layers to non-interactive
vegaSpec.marks[5].interactive = false;

vegaSpec.marks[6] ? vegaSpec.marks[6] = false : {}; // if noCompare, set that layer to interactive: false
vegaSpec.marks[6] ? vegaSpec.marks[6].interactive = false : {}; // if noCompare, set that layer to interactive: false

if (vegaSpec.marks[6]) {
console.log('no compare layer exists')
} else {
console.log('no no compare layer')
}

console.log(vegaSpec)

vegaEmbed("#trend", vegaSpec,{
actions: {
Expand Down

0 comments on commit f241423

Please sign in to comment.