@@ -89,30 +89,21 @@ def create_plot(
8989 chart .options = HighchartsOptions ()
9090
9191 # Title
92- chart .options .title = {
93- "text" : title if title else None ,
94- "style" : {"fontSize" : "16px" , "fontWeight" : "bold" },
95- }
92+ chart .options .title = {"text" : title if title else None , "style" : {"fontSize" : "16px" , "fontWeight" : "bold" }}
9693
9794 # X-axis configuration
9895 if x_is_categorical :
9996 chart .options .x_axis = {
10097 "categories" : x_values ,
101- "title" : {
102- "text" : xlabel or x ,
103- "style" : {"fontSize" : "12px" },
104- },
98+ "title" : {"text" : xlabel or x , "style" : {"fontSize" : "12px" }},
10599 "labels" : {"style" : {"fontSize" : "11px" }},
106100 "gridLineWidth" : 1 ,
107101 "gridLineDashStyle" : "Dot" ,
108102 "gridLineColor" : "rgba(0, 0, 0, 0.1)" ,
109103 }
110104 else :
111105 chart .options .x_axis = {
112- "title" : {
113- "text" : xlabel or x ,
114- "style" : {"fontSize" : "12px" },
115- },
106+ "title" : {"text" : xlabel or x , "style" : {"fontSize" : "12px" }},
116107 "labels" : {"style" : {"fontSize" : "11px" }},
117108 "gridLineWidth" : 1 ,
118109 "gridLineDashStyle" : "Dot" ,
@@ -121,40 +112,22 @@ def create_plot(
121112
122113 # Y-axis configuration
123114 chart .options .y_axis = {
124- "title" : {
125- "text" : ylabel or y ,
126- "style" : {"fontSize" : "12px" },
127- },
115+ "title" : {"text" : ylabel or y , "style" : {"fontSize" : "12px" }},
128116 "labels" : {"style" : {"fontSize" : "11px" }},
129117 "gridLineWidth" : 1 ,
130118 "gridLineDashStyle" : "Dot" ,
131119 "gridLineColor" : "rgba(0, 0, 0, 0.3)" ,
132120 }
133121
134122 # Chart dimensions and background
135- chart .options .chart = {
136- "type" : "line" ,
137- "width" : width ,
138- "height" : height ,
139- "backgroundColor" : "white" ,
140- }
123+ chart .options .chart = {"type" : "line" , "width" : width , "height" : height , "backgroundColor" : "white" }
141124
142125 # Plot options for line series
143- plot_options : dict = {
144- "line" : {
145- "lineWidth" : linewidth ,
146- "connectNulls" : False ,
147- "animation" : False ,
148- }
149- }
126+ plot_options : dict = {"line" : {"lineWidth" : linewidth , "connectNulls" : False , "animation" : False }}
150127
151128 # Handle marker configuration
152129 if marker :
153- marker_config : dict = {
154- "enabled" : True ,
155- "radius" : marker_size ,
156- "symbol" : marker ,
157- }
130+ marker_config : dict = {"enabled" : True , "radius" : marker_size , "symbol" : marker }
158131 plot_options ["line" ]["marker" ] = marker_config
159132 else :
160133 plot_options ["line" ]["marker" ] = {"enabled" : False }
0 commit comments