From 00e687226ffe6812333368e18f934de59d693da4 Mon Sep 17 00:00:00 2001 From: "M. Montesano" <55593359+mmontesanonyc@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:56:10 -0400 Subject: [PATCH] fix nocompare bug (again) --- assets/js/data-explorer/comparisons.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/assets/js/data-explorer/comparisons.js b/assets/js/data-explorer/comparisons.js index e80e58d1cd..3f04a07156 100644 --- a/assets/js/data-explorer/comparisons.js +++ b/assets/js/data-explorer/comparisons.js @@ -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: {