fix: remove .duration() calls from multiChart and stackedAreaChart
NVD3 1.8.1 on CDN doesn't expose .duration() on multiChart or stackedAreaChart top-level models. Duration is set via sub-components (.lines1.duration, .lines2.duration) which are already present. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -49,8 +49,7 @@ function ServerInfoPage(params, container) {
|
||||
nv.addGraph(function () {
|
||||
var perfChart = nv.models.multiChart()
|
||||
.margin({ top: 30, right: 75, bottom: 40, left: 75 })
|
||||
.color(['darkred', 'yellowgreen'])
|
||||
.duration(0);
|
||||
.color(['darkred', 'yellowgreen']);
|
||||
perfChart.yAxis1.axisLabel('Framerate').tickFormat(d3.format(',d'));
|
||||
perfChart.yAxis2.axisLabel('Entities').tickFormat(d3.format(',d'));
|
||||
perfChart.xAxis.axisLabel('Time').tickFormat(function (d) { return d3.time.format('%H:%M:%S')(new Date(d)); });
|
||||
@@ -67,8 +66,7 @@ function ServerInfoPage(params, container) {
|
||||
|
||||
nv.addGraph(function () {
|
||||
var netChart = nv.models.stackedAreaChart()
|
||||
.margin({ top: 0, right: 75, bottom: 40, left: 75 })
|
||||
.duration(0);
|
||||
.margin({ top: 0, right: 75, bottom: 40, left: 75 });
|
||||
netChart.yAxis.axisLabel('Network').tickFormat(function (bytes) {
|
||||
var fmt = d3.format('.0f');
|
||||
if (bytes < 1024) return fmt(bytes) + 'B';
|
||||
|
||||
Reference in New Issue
Block a user