Skip to content

Commit

Permalink
Fix threshold colour scale on Circular and Tabular Heat charts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesleesaunders committed Oct 3, 2017
1 parent 61de535 commit ee7e2e8
Show file tree
Hide file tree
Showing 8 changed files with 374 additions and 355 deletions.
4 changes: 2 additions & 2 deletions examples/CircularHeatChartExample.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
d3.json("data/netflix_isp_speed_index.json", function(error, json) {
// Netflix Speed ISP Speed Index Source: https://ispspeedindex.netflix.com/country/uk/

var colors = ["#c3ff28", "#ffff0b", "#fdb409", "#f38337", "#fb0007"];
var colors = ["#fb0007", "#f38337", "#fdb409", "#ffff0b", "#c3ff28"];
var chart = d3.ez.chart.circularHeat().colors(colors);
var legend = d3.ez.component.legend().title('Speed Index');
var title = d3.ez.component.title().mainText(json.Metadata.Title).subText(json.Metadata.Detail);
Expand All @@ -31,7 +31,7 @@
.legend(legend)
.title(title)
.on("customMouseOver", function(d, i) {
d3.select("#message").text(d.key);
d3.select("#message").text(d.value);
});

// Convert json to d3-ez data format
Expand Down
2 changes: 1 addition & 1 deletion examples/TabularHeatChartExample.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
d3.json("data/netflix_isp_speed_index.json", function(error, json) {
// Netflix Speed ISP Speed Index Source: https://ispspeedindex.netflix.com/country/uk/

var colors = ["#c3ff28", "#ffff0b", "#fdb409", "#f38337", "#fb0007"];
var colors = ["#fb0007", "#f38337", "#fdb409", "#ffff0b", "#c3ff28"];
var chart = d3.ez.chart.tabularHeat().colors(colors);
var legend = d3.ez.component.legend().title('Speed Index');
var title = d3.ez.component.title().mainText(json.Metadata.Title).subText(json.Metadata.Detail);
Expand Down
Loading

0 comments on commit ee7e2e8

Please sign in to comment.