在立体派示例中,将 context.horizon() 的 height 参数更改为较小的值会导致图形过度绘制自身。增加值的情况正好相反 - 过度绘制的情况较少。
但是,当我更改高度参数时,我的图表保留了相同级别的过度绘图,并且它们只是相应地向上和向下缩放。当我减小高度时,这些图表实际上会失去分辨率。
我该如何解决?
这是我的代码:
var context = cubism.context().step(1000000).size(1000);
var graphite = context.graphite("http://graphite.example.com");
var horizon = context.horizon().metric(graphite.metric).height(200);
var metrics = [
"summarize(example0,'10s')",
"summarize(example1,'10s')",
"summarize(example2),'10s')",
"summarize(example3),'10s')"
]
d3.select("#supergraph").append("div")
.attr("class", "axis")
.call(context.axis().ticks(4).orient("top"));
d3.select("#supergraph").append("div")
.attr("class", "rule")
.call(context.rule());
d3.select("#supergraph").selectAll(".horizon")
.data(metrics)
.enter().append("div")
.attr("class", "horizon")
.call(horizon);