2012-03-09 Sergio Martin <sergio.martin@artica.es>
* include/graphs/flot/pandora.flot.js: Fixed a xAxis bad tick calculating and added some transparency to graph areas git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5731 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9cde67be26
commit
3a7f5e1d9a
|
@ -1,3 +1,8 @@
|
||||||
|
2012-03-09 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/graphs/flot/pandora.flot.js: Fixed a xAxis bad
|
||||||
|
tick calculating and added some transparency to graph areas
|
||||||
|
|
||||||
2012-03-08 Miguel de Dios <miguel.dedios@artica.es>
|
2012-03-08 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
|
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
|
||||||
|
|
|
@ -556,7 +556,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
||||||
label: legend[i],
|
label: legend[i],
|
||||||
color: serie_color,
|
color: serie_color,
|
||||||
//threshold: [{ below: 80, color: "rgb(200, 20, 30)" } , { below: 65, color: "rgb(30, 200, 30)" }, { below: 50, color: "rgb(30, 200, 30)" }],
|
//threshold: [{ below: 80, color: "rgb(200, 20, 30)" } , { below: 65, color: "rgb(30, 200, 30)" }, { below: 50, color: "rgb(30, 200, 30)" }],
|
||||||
lines: { show: line_show, fill: filled, fillColor: { colors: [ { opacity: 1 }, { opacity: 1 } ]}, lineWidth:1, steps:false },
|
lines: { show: line_show, fill: filled, fillColor: { colors: [ { opacity: 0.9 }, { opacity: 0.9 } ]}, lineWidth:1, steps:false },
|
||||||
points: { show: points_show }
|
points: { show: points_show }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -588,7 +588,9 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
||||||
datas = data_base;
|
datas = data_base;
|
||||||
|
|
||||||
// minTickSize
|
// minTickSize
|
||||||
var mts = 130;
|
var count_data = datas[0].data.length;
|
||||||
|
var min_tick_pixels = 80;
|
||||||
|
var steps = parseInt( count_data / (width/min_tick_pixels));
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
series: {
|
series: {
|
||||||
|
@ -607,7 +609,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
||||||
},
|
},
|
||||||
xaxes: [ {
|
xaxes: [ {
|
||||||
tickFormatter: xFormatter,
|
tickFormatter: xFormatter,
|
||||||
minTickSize: mts,
|
minTickSize: steps,
|
||||||
color: '#000'
|
color: '#000'
|
||||||
} ],
|
} ],
|
||||||
yaxes: [ {
|
yaxes: [ {
|
||||||
|
@ -650,7 +652,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
||||||
xaxis: { },
|
xaxis: { },
|
||||||
xaxes: [ {
|
xaxes: [ {
|
||||||
tickFormatter: xFormatter,
|
tickFormatter: xFormatter,
|
||||||
minTickSize: mts,
|
minTickSize: steps,
|
||||||
color: '#000'
|
color: '#000'
|
||||||
} ],
|
} ],
|
||||||
yaxis: { ticks: [], min: 0, autoscaleMargin: 0.1 },
|
yaxis: { ticks: [], min: 0, autoscaleMargin: 0.1 },
|
||||||
|
@ -668,14 +670,14 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
||||||
|
|
||||||
factor = dataInSelection / dataInPlot;
|
factor = dataInSelection / dataInPlot;
|
||||||
|
|
||||||
new_mts = parseInt(factor*mts);
|
new_steps = parseInt(factor*steps);
|
||||||
|
|
||||||
plot = $.plot($('#'+graph_id), datas,
|
plot = $.plot($('#'+graph_id), datas,
|
||||||
$.extend(true, {}, options, {
|
$.extend(true, {}, options, {
|
||||||
xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to},
|
xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to},
|
||||||
xaxes: [ {
|
xaxes: [ {
|
||||||
tickFormatter: xFormatter,
|
tickFormatter: xFormatter,
|
||||||
minTickSize: new_mts,
|
minTickSize: new_steps,
|
||||||
color: '#000'
|
color: '#000'
|
||||||
} ],
|
} ],
|
||||||
legend: { show: false },
|
legend: { show: false },
|
||||||
|
|
Loading…
Reference in New Issue