Remove fixed max scale

This allows chart to re-scale all bars when disabling some of slow devices.
This commit is contained in:
2017-08-27 21:40:45 +02:00
parent 34c6f867b0
commit 4bed7a3f8a

View File

@@ -76,7 +76,6 @@ function findDatasetMaxValue(data) {
function buildChart(ctx, bare_data) {
var data = bare_data;
var max_value = findDatasetMaxValue(data);
setDatasetColor(data, true);
var my_chart = new Chart(
ctx,
@@ -93,8 +92,7 @@ function buildChart(ctx, bare_data) {
yAxes: [{display: true,
scaleLabel: {display: true,
labelString: 'Render time (sec)'},
ticks: {min: 0,
max: Math.ceil((max_value + 99) / 100) * 100}}]},
ticks: {min: 0}}]},
tooltips: {// mode: 'index',
callbacks: {
footer: function(tooltipItems, data) {
@@ -134,7 +132,6 @@ function historyChartGetSceneStats(bare_data, scene_name) {
function buildHistoryChart(ctx, bare_data, scene_name) {
var data = historyChartGetSceneStats(bare_data, scene_name);
var max_value = findDatasetMaxValue(data);
setDatasetColor(data, false);
new Chart(
ctx,
@@ -153,8 +150,7 @@ function buildHistoryChart(ctx, bare_data, scene_name) {
yAxes: [{display: true,
scaleLabel: {display: true,
labelString: 'Render time (sec)'},
ticks: {min: 0,
max: Math.ceil((max_value + 99) / 100) * 100}}]},
ticks: {min: 0}}]},
elements: { line: { tension: 0.000001 } },
}