Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cloud-quote
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
cloud-quote
Commits
9e5c3495
Commit
9e5c3495
authored
Apr 05, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed colors of graph series
parent
5b6a2378
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
gadgets/results.html
gadgets/results.html
+22
-17
No files found.
gadgets/results.html
View file @
9e5c3495
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#results_list
.start_over
.ui-btn-inner
{
padding-top
:
11px
;
padding-bottom
:
11px
;
}
#results_list
.start_over
.ui-btn-inner
{
padding-top
:
11px
;
padding-bottom
:
11px
;
}
/* graph */
/* graph */
#results_list
#graph_container_cell
{
min-height
:
360px
;
padding
:
.25em
;
max-width
:
80%
;
margin
:
0
auto
;}
#results_list
#graph_container_cell
{
min-height
:
360px
;
padding
:
.25em
;
max-width
:
80%
;
margin
:
2em
auto
;}
/* popups */
/* popups */
.ui-collapsible-popup
{
padding
:
0
;}
.ui-collapsible-popup
{
padding
:
0
;}
.ui-collapsible-popup
.ui-collapsible-set-horizontal
.ui-collapsible-content
{
margin-top
:
-15px
;
border
:
0
none
;
padding
:
0
;}
.ui-collapsible-popup
.ui-collapsible-set-horizontal
.ui-collapsible-content
{
margin-top
:
-15px
;
border
:
0
none
;
padding
:
0
;}
...
@@ -210,26 +210,28 @@
...
@@ -210,26 +210,28 @@
makeColors
=
function
(
array
,
get
,
axis
)
{
makeColors
=
function
(
array
,
get
,
axis
)
{
var
pos
,
colorObject
=
{},
colorArray
=
[];
var
pos
,
colorObject
=
{},
colorArray
=
[];
if
(
get
===
"
max
"
)
{
//if (get === "max") {
pos
=
arrayMax
(
array
);
// pos = arrayMax(array);
}
else
{
//} else {
pos
=
arrayMin
(
array
);
// pos = arrayMin(array);
}
//}
for
(
i
=
0
;
i
<
array
.
length
;
i
+=
1
)
{
// highlight min/max value, rest gray... not working well with 4 series
if
(
array
[
i
]
===
pos
||
array
.
length
===
1
)
{
//for (i = 0; i
<
array
.
length
;
i
+=
1
)
{
colorArray
.
push
(
"
#2DBCF8
"
);
// if (array[i] === pos || array.length === 1) {
}
else
{
// colorArray.push("#2DBCF8");
colorArray
.
push
(
"
#ccc
"
);
// } else {
}
// colorArray.push("#ccc");
}
// }
colorObject
.
series_colors
=
colorArray
;
//}
//colorObject.series_colors = colorArray;
//add rest, too...
//add rest, too...
if
(
axis
===
"
log
"
)
{
if
(
axis
===
"
log
"
)
{
colorObject
.
yaxis
=
"
yaxis
"
;
colorObject
.
yaxis
=
"
yaxis
"
;
}
else
{
}
else
{
colorObject
.
yaxis
=
"
y2axis
"
;
colorObject
.
yaxis
=
"
y2axis
"
;
}
}
colorObject
.
legend
=
"
#ccc
"
;
colorObject
.
pointLabels
=
{
edgeTolerance
:
-
50
}
// colorObject.legend = "#ccc";
return
colorObject
;
return
colorObject
;
},
},
...
@@ -631,7 +633,7 @@
...
@@ -631,7 +633,7 @@
// title: 'Performance Benchmarks',
// title: 'Performance Benchmarks',
seriesDefaults
:{
seriesDefaults
:{
renderer
:
$
.
jqplot
.
BarRenderer
,
renderer
:
$
.
jqplot
.
BarRenderer
,
rendererOptions
:{
varyBarColor
:
true
,
barWidth
:
useBarWidth
}
rendererOptions
:{
/* varyBarColor : true,*/
barWidth
:
useBarWidth
}
},
},
tickDefaults
:
{
tickDefaults
:
{
syncTicks
:
true
,
syncTicks
:
true
,
...
@@ -655,7 +657,7 @@
...
@@ -655,7 +657,7 @@
// autoscale: true
// autoscale: true
},
},
y2axis
:{
y2axis
:{
label
:
'
Uptime (%), Cost($/h)
'
,
label
:
'
Uptime (%), Cost
($/h)
'
,
// renderer: $.jqplot.CategoryAxisRenderer,
// renderer: $.jqplot.CategoryAxisRenderer,
//btickSpacing: 50,
//btickSpacing: 50,
// min: 0,
// min: 0,
...
@@ -669,6 +671,7 @@
...
@@ -669,6 +671,7 @@
legend
:
{
legend
:
{
show
:
true
,
show
:
true
,
placement
:
'
outsideGrid
'
placement
:
'
outsideGrid
'
// location:'s'
}
}
};
};
...
@@ -708,6 +711,8 @@
...
@@ -708,6 +711,8 @@
plotOpts
.
legend
.
labels
=
plotLables
;
plotOpts
.
legend
.
labels
=
plotLables
;
plotOpts
.
series
=
series_colors
;
plotOpts
.
series
=
series_colors
;
console
.
log
(
plotOpts
)
// now we plot - only if a series is shown
// now we plot - only if a series is shown
if
(
plotSeries
.
length
!==
0
)
{
if
(
plotSeries
.
length
!==
0
)
{
plot1
=
$
.
jqplot
(
'
graph_container_cell
'
,
plotSeries
,
plotOpts
);
plot1
=
$
.
jqplot
(
'
graph_container_cell
'
,
plotSeries
,
plotOpts
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment