##// END OF EJS Templates
slight svg rendering modifications...
Jean-Philippe Lang -
r384:b938c60396e2
parent child
Show More
@@ -105,7 +105,7 module SVG
105
105
106 init_with({
106 init_with({
107 :width => 500,
107 :width => 500,
108 :height => 300,
108 :height => 300,
109 :show_x_guidelines => false,
109 :show_x_guidelines => false,
110 :show_y_guidelines => true,
110 :show_y_guidelines => true,
111 :show_data_values => true,
111 :show_data_values => true,
@@ -137,14 +137,14 module SVG
137 :key => true,
137 :key => true,
138 :key_position => :right, # bottom or right
138 :key_position => :right, # bottom or right
139
139
140 :font_size =>11,
140 :font_size =>10,
141 :title_font_size =>12,
141 :title_font_size =>12,
142 :subtitle_font_size =>14,
142 :subtitle_font_size =>14,
143 :x_label_font_size =>12,
143 :x_label_font_size =>11,
144 :x_title_font_size =>14,
144 :x_title_font_size =>14,
145 :y_label_font_size =>12,
145 :y_label_font_size =>11,
146 :y_title_font_size =>14,
146 :y_title_font_size =>14,
147 :key_font_size =>10,
147 :key_font_size => 9,
148
148
149 :no_css =>false,
149 :no_css =>false,
150 :add_popups =>false,
150 :add_popups =>false,
@@ -392,7 +392,7 module SVG
392 @border_right = 7
392 @border_right = 7
393 if key and key_position == :right
393 if key and key_position == :right
394 val = keys.max { |a,b| a.length <=> b.length }
394 val = keys.max { |a,b| a.length <=> b.length }
395 @border_right += val.length * key_font_size * 0.6
395 @border_right += val.length * key_font_size * 0.7
396 @border_right += KEY_BOX_SIZE
396 @border_right += KEY_BOX_SIZE
397 @border_right += 10 # Some padding around the box
397 @border_right += 10 # Some padding around the box
398 end
398 end
@@ -723,7 +723,7 module SVG
723 })
723 })
724 group.add_element( "text", {
724 group.add_element( "text", {
725 "x" => (KEY_BOX_SIZE + 5).to_s,
725 "x" => (KEY_BOX_SIZE + 5).to_s,
726 "y" => (y_offset + KEY_BOX_SIZE).to_s,
726 "y" => (y_offset + KEY_BOX_SIZE - 2).to_s,
727 "class" => "keyText"
727 "class" => "keyText"
728 }).text = key_name.to_s
728 }).text = key_name.to_s
729 key_count += 1
729 key_count += 1
@@ -883,7 +883,7 module SVG
883 fill:#ffffff;
883 fill:#ffffff;
884 }
884 }
885 .graphBackground{
885 .graphBackground{
886 fill:#f0f0f0;
886 fill:#f5f5f5;
887 }
887 }
888
888
889 /* graphs titles */
889 /* graphs titles */
@@ -898,26 +898,26 module SVG
898 text-anchor: middle;
898 text-anchor: middle;
899 fill: #999999;
899 fill: #999999;
900 font-size: #{subtitle_font_size}px;
900 font-size: #{subtitle_font_size}px;
901 font-family: "Arial", sans-serif;
901 font-family: "Verdana", sans-serif;
902 font-weight: normal;
902 font-weight: normal;
903 }
903 }
904
904
905 .axis{
905 .axis{
906 stroke: #000000;
906 stroke: #666666;
907 stroke-width: 1px;
907 stroke-width: 1px;
908 }
908 }
909
909
910 .guideLines{
910 .guideLines{
911 stroke: #666666;
911 stroke: #666666;
912 stroke-width: 1px;
912 stroke-width: 1px;
913 stroke-dasharray: 5 5;
913 stroke-dasharray:2,2,2;
914 }
914 }
915
915
916 .xAxisLabels{
916 .xAxisLabels{
917 text-anchor: middle;
917 text-anchor: middle;
918 fill: #000000;
918 fill: #000000;
919 font-size: #{x_label_font_size}px;
919 font-size: #{x_label_font_size}px;
920 font-family: "Arial", sans-serif;
920 font-family: "Verdana", sans-serif;
921 font-weight: normal;
921 font-weight: normal;
922 }
922 }
923
923
@@ -925,7 +925,7 module SVG
925 text-anchor: end;
925 text-anchor: end;
926 fill: #000000;
926 fill: #000000;
927 font-size: #{y_label_font_size}px;
927 font-size: #{y_label_font_size}px;
928 font-family: "Arial", sans-serif;
928 font-family: "Verdana", sans-serif;
929 font-weight: normal;
929 font-weight: normal;
930 }
930 }
931
931
@@ -933,7 +933,7 module SVG
933 text-anchor: middle;
933 text-anchor: middle;
934 fill: #ff0000;
934 fill: #ff0000;
935 font-size: #{x_title_font_size}px;
935 font-size: #{x_title_font_size}px;
936 font-family: "Arial", sans-serif;
936 font-family: "Verdana", sans-serif;
937 font-weight: normal;
937 font-weight: normal;
938 }
938 }
939
939
@@ -941,7 +941,7 module SVG
941 fill: #ff0000;
941 fill: #ff0000;
942 text-anchor: middle;
942 text-anchor: middle;
943 font-size: #{y_title_font_size}px;
943 font-size: #{y_title_font_size}px;
944 font-family: "Arial", sans-serif;
944 font-family: "Verdana", sans-serif;
945 font-weight: normal;
945 font-weight: normal;
946 }
946 }
947
947
@@ -949,7 +949,7 module SVG
949 fill: #000000;
949 fill: #000000;
950 text-anchor:middle;
950 text-anchor:middle;
951 font-size: 10px;
951 font-size: 10px;
952 font-family: "Arial", sans-serif;
952 font-family: "Verdana", sans-serif;
953 font-weight: normal;
953 font-weight: normal;
954 }
954 }
955
955
@@ -965,7 +965,7 module SVG
965 fill: #000000;
965 fill: #000000;
966 text-anchor:start;
966 text-anchor:start;
967 font-size: #{key_font_size}px;
967 font-size: #{key_font_size}px;
968 font-family: "Arial", sans-serif;
968 font-family: "Verdana", sans-serif;
969 font-weight: normal;
969 font-weight: normal;
970 }
970 }
971 /* End copy for external style sheet */
971 /* End copy for external style sheet */
General Comments 0
You need to be logged in to leave comments. Login now