@@ -273,25 +273,39 @@ def createTable(df, id):
273
273
return dash_table .DataTable (
274
274
df .to_dict ('records' ),
275
275
columns = [{"name" : i , "id" : i , "presentation" : "markdown" } for i in df .columns ],
276
- markdown_options = {"html" : True },
277
- style_cell = {
278
- 'padding' : '2px' ,
279
- 'font-size' : '1.5em' ,
280
- 'textAlign' : 'center' ,
281
- 'whiteSpace' : 'pre-line' ,
282
- },
283
- style_header = {
284
- 'backgroundColor' : 'white' ,
285
- 'fontWeight' : 'bold'
286
- },
287
- style_data = {
288
- 'height' : 'auto' ,
289
- 'overflowX' : 'auto' ,
290
- },
291
- style_table = {
292
- 'overflowY' : 'auto' ,
293
- 'overflowX' : 'auto'
294
- },
276
+ markdown_options = {"html" : True },
277
+ style_cell = {
278
+ 'padding' : '10px' ,
279
+ 'font-size' : '1.5em' ,
280
+ 'textAlign' : 'center' ,
281
+ 'whiteSpace' : 'normal' ,
282
+ 'backgroundColor' : '#f9f9f9' ,
283
+ 'border' : '1px solid #ddd' ,
284
+ 'fontFamily' : 'sans-serif "Courier New", Courier, monospace !important'
285
+ },
286
+ style_header = {
287
+ 'fontWeight' : 'bold' ,
288
+ 'color' : 'black' ,
289
+ 'border' : '1px solid #ddd' ,
290
+ },
291
+ style_data = {
292
+ 'height' : 'auto' ,
293
+ 'lineHeight' : '20px' ,
294
+ 'border' : '1px solid #ddd' ,
295
+ },
296
+ style_table = {
297
+ 'overflowY' : 'auto' ,
298
+ 'overflowX' : 'auto' ,
299
+ 'border' : '1px solid #ddd' ,
300
+ 'borderRadius' : '5px' ,
301
+ 'boxShadow' : '0 2px 5px rgba(0,0,0,0.1)' ,
302
+ },
303
+ style_data_conditional = [
304
+ {
305
+ 'if' : {'row_index' : 'odd' },
306
+ 'backgroundColor' : '#f2f2f2' ,
307
+ }
308
+ ],
295
309
id = id )
296
310
297
311
@@ -587,7 +601,7 @@ def toggle_modal(n1, n2, is_open):
587
601
dbc .Col (children = [
588
602
html .H3 ('Category & Alarm types' , className = 'status-title' ),
589
603
html .Div (statusExplainedTable , className = 'how-status-table' )
590
- ], lg = 12 , md = 12 , sm = 12 , className = 'page-cont pr-1 how-status-cont' ),
604
+ ], lg = 12 , md = 12 , sm = 12 , className = 'page-cont pr-1 how-status-cont mb-1 ' ),
591
605
dbc .Col (children = [
592
606
html .H3 ('Status color rules' , className = 'status-title' ),
593
607
html .Div (catTable , className = 'how-status-table' )
0 commit comments