Var btn2 = document.querySelector(". Choose from your style guide’s color palette, the color picker, or insert a hex code to create the color scheme you want. Changing the canvas’ color scheme will affect all headings on text modules and all graphs. Var btn1 = document.querySelector(".filters_item-1") You can change the canvas color scheme to change the colors of all the content inside it and match your or your clients’ branding.
Var svg = d3.select(".result_output-chart").append("svg") Var radius = Math.min(width, height) / 2 I tried to use IF condition (if link has class 'active', scheme has to change), but it doesn't work.Ĭonst chart = document.querySelector(".result")Ĭonst input = document.querySelectorAll(".input-block_item") Ĭonst inputBlock = document.querySelector(".input-block") Ĭonst filtersBtn = document.querySelectorAll(".filters_item") Ĭonst colorDefault = d3.scaleOrdinal(d3.schemeSet3) Ĭonst colorHaiku = d3.scaleOrdinal()Ĭonst colorSet = I want to change pie chart color scheme with click on a link.