projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improved library handling
[rrdtool.git]
/
src
/
rrd_graph.c
diff --git
a/src/rrd_graph.c
b/src/rrd_graph.c
index
d166f07
..
706bd49
100644
(file)
--- a/
src/rrd_graph.c
+++ b/
src/rrd_graph.c
@@
-1866,7
+1866,7
@@
int leg_place(
glue = 0;
}
if (prt_fctn == 'c')
glue = 0;
}
if (prt_fctn == 'c')
- leg_x = (double)(legendwidth - fill) / 2.0;
+ leg_x =
border +
(double)(legendwidth - fill) / 2.0;
if (prt_fctn == 'r')
leg_x = legendwidth - fill + border;
for (ii = mark; ii <= i; ii++) {
if (prt_fctn == 'r')
leg_x = legendwidth - fill + border;
for (ii = mark; ii <= i; ii++) {
@@
-2954,6
+2954,9
@@
int graph_size_location(
if (im->second_axis_legend[0] != '\0') {
Xvertical2 = im->text_prop[TEXT_PROP_UNIT].size * 2;
}
if (im->second_axis_legend[0] != '\0') {
Xvertical2 = im->text_prop[TEXT_PROP_UNIT].size * 2;
}
+ else{
+ Xvertical2 = Xspacing;
+ }
if (im->title[0] != '\0') {
/* The title is placed "inbetween" two text lines so it
if (im->title[0] != '\0') {
/* The title is placed "inbetween" two text lines so it
@@
-2965,7
+2968,7
@@
int graph_size_location(
}
else{
// we have no title; get a little clearing from the top
}
else{
// we have no title; get a little clearing from the top
- Ytitle =
1.5 *
Yspacing;
+ Ytitle = Yspacing;
}
if (elements) {
}
if (elements) {
@@
-3059,7
+3062,7
@@
int graph_size_location(
/* reserve space for padding below the graph */
if (im->extra_flags & NOLEGEND) {
/* reserve space for padding below the graph */
if (im->extra_flags & NOLEGEND) {
- Ymain -= Yspacing;
+ Ymain -=
0.5*
Yspacing;
}
if (im->watermark[0] != '\0') {
}
if (im->watermark[0] != '\0') {
@@
-3119,7
+3122,7
@@
int graph_size_location(
}
/* reserve space for padding below the graph */
if (im->extra_flags & NOLEGEND) {
}
/* reserve space for padding below the graph */
if (im->extra_flags & NOLEGEND) {
- im->yimg += Yspacing;
+ im->yimg +=
0.5*
Yspacing;
}
if (im->watermark[0] != '\0') {
}
if (im->watermark[0] != '\0') {
@@
-3148,7
+3151,7
@@
int graph_size_location(
*/
switch(im->legendposition){
case NORTH:
*/
switch(im->legendposition){
case NORTH:
- im->xOriginTitle =
Xvertical + Xylabel + (im->xsize
/ 2);
+ im->xOriginTitle =
(im->ximg
/ 2);
im->yOriginTitle = 0;
im->xOriginLegend = 0;
im->yOriginTitle = 0;
im->xOriginLegend = 0;
@@
-3169,7
+3172,7
@@
int graph_size_location(
break;
case WEST:
break;
case WEST:
- im->xOriginTitle = im->legendwidth +
Xvertical + Xylabel +
im->xsize / 2;
+ im->xOriginTitle = im->legendwidth + im->xsize / 2;
im->yOriginTitle = 0;
im->xOriginLegend = 0;
im->yOriginTitle = 0;
im->xOriginLegend = 0;
@@
-3190,7
+3193,7
@@
int graph_size_location(
break;
case SOUTH:
break;
case SOUTH:
- im->xOriginTitle =
Xvertical + Xylabel + im->xsize
/ 2;
+ im->xOriginTitle =
im->ximg
/ 2;
im->yOriginTitle = 0;
im->xOriginLegend = 0;
im->yOriginTitle = 0;
im->xOriginLegend = 0;
@@
-3211,7
+3214,7
@@
int graph_size_location(
break;
case EAST:
break;
case EAST:
- im->xOriginTitle =
Xvertical + Xylabel +
im->xsize / 2;
+ im->xOriginTitle = im->xsize / 2;
im->yOriginTitle = 0;
im->xOriginLegend = Xvertical + Xylabel + Xmain + Xvertical2;
im->yOriginTitle = 0;
im->xOriginLegend = Xvertical + Xylabel + Xmain + Xvertical2;