From 486138326f82076aaa735713eb5b37eebbbeb221 Mon Sep 17 00:00:00 2001 From: Richard Hitier Date: Mon, 26 Apr 2021 11:52:41 +0200 Subject: [PATCH] Fix legend keys order --- app/main/static/js/charges.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/static/js/charges.js b/app/main/static/js/charges.js index 579b741..2500a34 100644 --- a/app/main/static/js/charges.js +++ b/app/main/static/js/charges.js @@ -142,7 +142,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { var addlegend = function (color_scale) { // add horizontal legend - let reverse_keys = color_scale.domain().reverse(); + let legend_keys = color_scale.domain(); var legendSpacing = 5; var legendWrap = svg.append('g') @@ -150,7 +150,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { .attr('class', 'legendwrap'); var legend = svg.select('.legendwrap').selectAll('.legend') - .data(reverse_keys) + .data(legend_keys) .enter() .append('g') .attr('class', 'legend'); -- libgit2 0.21.2