slight svg rendering modifications

git-svn-id: http://redmine.rubyforge.org/svn/trunk@387 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-03-26 18:13:42 +00:00
parent 3a28fa01b0
commit b938c60396
1 changed files with 17 additions and 17 deletions

View File

@ -105,7 +105,7 @@ module SVG
init_with({ init_with({
:width => 500, :width => 500,
:height => 300, :height => 300,
:show_x_guidelines => false, :show_x_guidelines => false,
:show_y_guidelines => true, :show_y_guidelines => true,
:show_data_values => true, :show_data_values => true,
@ -137,14 +137,14 @@ module SVG
:key => true, :key => true,
:key_position => :right, # bottom or right :key_position => :right, # bottom or right
:font_size =>11, :font_size =>10,
:title_font_size =>12, :title_font_size =>12,
:subtitle_font_size =>14, :subtitle_font_size =>14,
:x_label_font_size =>12, :x_label_font_size =>11,
:x_title_font_size =>14, :x_title_font_size =>14,
:y_label_font_size =>12, :y_label_font_size =>11,
:y_title_font_size =>14, :y_title_font_size =>14,
:key_font_size =>10, :key_font_size => 9,
:no_css =>false, :no_css =>false,
:add_popups =>false, :add_popups =>false,
@ -392,7 +392,7 @@ module SVG
@border_right = 7 @border_right = 7
if key and key_position == :right if key and key_position == :right
val = keys.max { |a,b| a.length <=> b.length } val = keys.max { |a,b| a.length <=> b.length }
@border_right += val.length * key_font_size * 0.6 @border_right += val.length * key_font_size * 0.7
@border_right += KEY_BOX_SIZE @border_right += KEY_BOX_SIZE
@border_right += 10 # Some padding around the box @border_right += 10 # Some padding around the box
end end
@ -723,7 +723,7 @@ module SVG
}) })
group.add_element( "text", { group.add_element( "text", {
"x" => (KEY_BOX_SIZE + 5).to_s, "x" => (KEY_BOX_SIZE + 5).to_s,
"y" => (y_offset + KEY_BOX_SIZE).to_s, "y" => (y_offset + KEY_BOX_SIZE - 2).to_s,
"class" => "keyText" "class" => "keyText"
}).text = key_name.to_s }).text = key_name.to_s
key_count += 1 key_count += 1
@ -883,7 +883,7 @@ module SVG
fill:#ffffff; fill:#ffffff;
} }
.graphBackground{ .graphBackground{
fill:#f0f0f0; fill:#f5f5f5;
} }
/* graphs titles */ /* graphs titles */
@ -898,26 +898,26 @@ module SVG
text-anchor: middle; text-anchor: middle;
fill: #999999; fill: #999999;
font-size: #{subtitle_font_size}px; font-size: #{subtitle_font_size}px;
font-family: "Arial", sans-serif; font-family: "Verdana", sans-serif;
font-weight: normal; font-weight: normal;
} }
.axis{ .axis{
stroke: #000000; stroke: #666666;
stroke-width: 1px; stroke-width: 1px;
} }
.guideLines{ .guideLines{
stroke: #666666; stroke: #666666;
stroke-width: 1px; stroke-width: 1px;
stroke-dasharray: 5 5; stroke-dasharray:2,2,2;
} }
.xAxisLabels{ .xAxisLabels{
text-anchor: middle; text-anchor: middle;
fill: #000000; fill: #000000;
font-size: #{x_label_font_size}px; font-size: #{x_label_font_size}px;
font-family: "Arial", sans-serif; font-family: "Verdana", sans-serif;
font-weight: normal; font-weight: normal;
} }
@ -925,7 +925,7 @@ module SVG
text-anchor: end; text-anchor: end;
fill: #000000; fill: #000000;
font-size: #{y_label_font_size}px; font-size: #{y_label_font_size}px;
font-family: "Arial", sans-serif; font-family: "Verdana", sans-serif;
font-weight: normal; font-weight: normal;
} }
@ -933,7 +933,7 @@ module SVG
text-anchor: middle; text-anchor: middle;
fill: #ff0000; fill: #ff0000;
font-size: #{x_title_font_size}px; font-size: #{x_title_font_size}px;
font-family: "Arial", sans-serif; font-family: "Verdana", sans-serif;
font-weight: normal; font-weight: normal;
} }
@ -941,7 +941,7 @@ module SVG
fill: #ff0000; fill: #ff0000;
text-anchor: middle; text-anchor: middle;
font-size: #{y_title_font_size}px; font-size: #{y_title_font_size}px;
font-family: "Arial", sans-serif; font-family: "Verdana", sans-serif;
font-weight: normal; font-weight: normal;
} }
@ -949,7 +949,7 @@ module SVG
fill: #000000; fill: #000000;
text-anchor:middle; text-anchor:middle;
font-size: 10px; font-size: 10px;
font-family: "Arial", sans-serif; font-family: "Verdana", sans-serif;
font-weight: normal; font-weight: normal;
} }
@ -965,7 +965,7 @@ module SVG
fill: #000000; fill: #000000;
text-anchor:start; text-anchor:start;
font-size: #{key_font_size}px; font-size: #{key_font_size}px;
font-family: "Arial", sans-serif; font-family: "Verdana", sans-serif;
font-weight: normal; font-weight: normal;
} }
/* End copy for external style sheet */ /* End copy for external style sheet */