Вопрос

Would anyone know how to hide the value label from a horizon chart?

enter image description here

The code is simply

d3.select("#graphs").selectAll(".horizon")
    .data(data)
    .enter().insert("div", ".bottom")
    .attr("class", "horizon")
    .call(context.horizon().height(25)
                           .colors(colors));
Это было полезно?

Решение

This can be solved by defining the following function

function empty_label() {
  return "";
} 

and then using it here:

d3.select("#..")
  .selectAll(".horizon")
  .data(data)
  .enter()
  .insert("div", ".bottom")
  .attr("class", "horizon")
  .call(context.horizon().format(empty_label()));
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top