luci-app-statistics: provide defaul minimal scale for some graphs
Avoid cryptic "200m" axis items for really small values by setting a default minimal y-axis max value for some of the conntrack, cpu, cpufreq, load and ping graphs (mainly percentages). The axis automatically scales upward if necessary, so this just provides a minimal "at least" scale for the y-axis. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
parent
3aedb609ce
commit
d9e548fe0c
5 changed files with 10 additions and 0 deletions
|
@ -33,6 +33,7 @@ return baseclass.extend({
|
||||||
vlabel: "Percent",
|
vlabel: "Percent",
|
||||||
number_format: "%5.1lf%%",
|
number_format: "%5.1lf%%",
|
||||||
y_min: "0",
|
y_min: "0",
|
||||||
|
y_max: "2",
|
||||||
alt_autoscale_max: true,
|
alt_autoscale_max: true,
|
||||||
data: {
|
data: {
|
||||||
instances: {
|
instances: {
|
||||||
|
|
|
@ -77,6 +77,7 @@ return baseclass.extend({
|
||||||
var percent = {
|
var percent = {
|
||||||
title: title,
|
title: title,
|
||||||
y_min: "0",
|
y_min: "0",
|
||||||
|
y_max: "2",
|
||||||
alt_autoscale_max: true,
|
alt_autoscale_max: true,
|
||||||
vlabel: "Percent",
|
vlabel: "Percent",
|
||||||
number_format: "%5.1lf%%",
|
number_format: "%5.1lf%%",
|
||||||
|
@ -142,6 +143,7 @@ return baseclass.extend({
|
||||||
p = {
|
p = {
|
||||||
title: title,
|
title: title,
|
||||||
y_min: "0",
|
y_min: "0",
|
||||||
|
y_max: "2",
|
||||||
alt_autoscale_max: true,
|
alt_autoscale_max: true,
|
||||||
vlabel: "Percent",
|
vlabel: "Percent",
|
||||||
number_format: "%5.1lf%%",
|
number_format: "%5.1lf%%",
|
||||||
|
|
|
@ -26,6 +26,8 @@ return baseclass.extend({
|
||||||
detail: true,
|
detail: true,
|
||||||
title: "%H: Frequency transitions - core %pi",
|
title: "%H: Frequency transitions - core %pi",
|
||||||
alt_autoscale: true,
|
alt_autoscale: true,
|
||||||
|
y_min: "0",
|
||||||
|
y_max: "2",
|
||||||
vlabel: "Transitions",
|
vlabel: "Transitions",
|
||||||
number_format: "%3.2lf%s",
|
number_format: "%3.2lf%s",
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -11,6 +11,7 @@ return baseclass.extend({
|
||||||
title: "%H: Load",
|
title: "%H: Load",
|
||||||
vlabel: "Load",
|
vlabel: "Load",
|
||||||
y_min: "0",
|
y_min: "0",
|
||||||
|
y_max: "0.2",
|
||||||
units_exponent: "0",
|
units_exponent: "0",
|
||||||
number_format: "%5.2lf",
|
number_format: "%5.2lf",
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -28,6 +28,8 @@ return baseclass.extend({
|
||||||
var droprate = {
|
var droprate = {
|
||||||
title: "%H: ICMP Drop Rate",
|
title: "%H: ICMP Drop Rate",
|
||||||
vlabel: "%",
|
vlabel: "%",
|
||||||
|
y_min: "0",
|
||||||
|
y_max: "4",
|
||||||
number_format: "%5.2lf %%",
|
number_format: "%5.2lf %%",
|
||||||
data: {
|
data: {
|
||||||
types: [ "ping_droprate" ],
|
types: [ "ping_droprate" ],
|
||||||
|
@ -45,6 +47,8 @@ return baseclass.extend({
|
||||||
var stddev = {
|
var stddev = {
|
||||||
title: "%H: ICMP Standard Deviation",
|
title: "%H: ICMP Standard Deviation",
|
||||||
vlabel: "ms",
|
vlabel: "ms",
|
||||||
|
y_min: "0",
|
||||||
|
y_max: "1",
|
||||||
number_format: "%5.1lf ms",
|
number_format: "%5.1lf ms",
|
||||||
data: {
|
data: {
|
||||||
types: [ "ping_stddev" ],
|
types: [ "ping_stddev" ],
|
||||||
|
|
Loading…
Reference in a new issue