@@ -83,7 +83,7 @@ func (p *Parameters) barchart(location string, canvas *svg.SVG) {
83
83
if bw < 2 {
84
84
bw = 2
85
85
}
86
- canvas .Text (p .x , p .y - halfoffset , sp .Title , "font-size:400 %" )
86
+ canvas .Text (p .x , p .y - halfoffset , sp .Title , "font-size:300 %" )
87
87
if p .showgrid {
88
88
canvas .Gstyle ("stroke:lightgray;stroke-width:1px" )
89
89
gx := p .x - (bw / 2 )
@@ -107,7 +107,7 @@ func (p *Parameters) barchart(location string, canvas *svg.SVG) {
107
107
}
108
108
if p .showimage {
109
109
if len (d .Image ) > 0 {
110
- canvas .Image (p .x - bw / 2 , by - offset - 2 , bw , offset , d .Image )
110
+ canvas .Image (p .x - bw / 2 , by - offset - p . fontsize , bw , offset , d .Image )
111
111
}
112
112
}
113
113
canvas .Gstyle ("stroke:none;fill:black" )
@@ -121,7 +121,7 @@ func (p *Parameters) barchart(location string, canvas *svg.SVG) {
121
121
}
122
122
}
123
123
if p .showprice {
124
- canvas .Text (p .x , by , fmt .Sprintf ("%.2f" , d .Price ), "font-weight:bold" )
124
+ canvas .Text (p .x , by + p . fontsize , fmt .Sprintf ("%.2f" , d .Price ), "font-size:150%; font-weight:bold" )
125
125
}
126
126
if p .showdate {
127
127
canvas .Text (p .x , bottom + 20 , d .Date )
@@ -166,7 +166,7 @@ func main() {
166
166
canvas := svg .New (os .Stdout )
167
167
canvas .Start (param .width , param .height )
168
168
canvas .Rect (0 , 0 , width , height , canvas .RGB (255 , 255 , 255 ))
169
- canvas .Gstyle (fmt .Sprintf ("font-family:Calibri;font-size:%dpx" , param .fontsize ))
169
+ canvas .Gstyle (fmt .Sprintf ("font-family:Calibri,sans-serif ;font-size:%dpx" , param .fontsize ))
170
170
if len (flag .Args ()) == 0 {
171
171
param .barchart ("" , canvas )
172
172
} else {
0 commit comments