1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
|
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
|
-
|
(let*
((graph-cell (conc row ":" col))
(graph-dat (hash-table-ref/default graph-cell-table graph-cell #f))
(graph-flag (dboard:graph-dat-flag graph-dat)))
(if graph-flag
(dboard:graph-dat-flag-set! graph-dat #f)
(dboard:graph-dat-flag-set! graph-dat #t))
(print "Toggling graph, need to work on updaters")
(if (not (dboard:tabdat-running-layout tabdat))
(begin
(dashboard:run-times-tab-run-data-updater commondat tabdat tab-num)
(dboard:tabdat-last-data-update-set! tabdat (current-seconds))
(thread-start! (make-thread
(lambda ()
(dboard:tabdat-running-layout-set! tabdat #t)
|
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
|
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
|
-
+
|
(col-num (cadr (assoc col-name col-indices)))
(key (conc row-num ":" col-num)))
(hash-table-set! cell-lookup key test-id)
(if (not (equal? (iup:attribute run-matrix key) (cadr value)))
(begin
(set! changed #t)
(iup:attribute-set! run-matrix key (cadr value))
(print "RA=> value" (car value))
;; (print "RA=> value" (car value))
(iup:attribute-set! run-matrix (conc "BGCOLOR" key) (car value))))))
matrix-content)
;; Col labels - do after setting Cell contents so they are accounted for in the size calc.
(for-each (lambda (ind)
(let* ((name (car ind))
|
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
|
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
|
-
+
+
-
|
id: fieldn
color: graph-color
flag: #t
cell: graph-cell
)))
(hash-table-set! graph-matrix-table fieldn graph-dat)
(hash-table-set! graph-cell-table graph-cell graph-dat)
(print "Graph data " graph-matrix-row " " graph-matrix-col " " fieldn " " graph-color " " graph-color-rgb " ")
;; (print "Graph data " graph-matrix-row " " graph-matrix-col " " fieldn " " graph-color " " graph-color-rgb " ")
;; (print "Graph data " graph-matrix-row " " graph-matrix-col " " fieldn " " graph-color " " graph-color-rgb " ")
(set! changed #t)
(iup:attribute-set! graph-matrix (conc graph-matrix-row ":" graph-matrix-col) fieldn)
(iup:attribute-set! graph-matrix (conc "BGCOLOR" (conc graph-matrix-row ":" graph-matrix-col)) graph-color-rgb)
(if (> graph-matrix-col 10)
(begin
(dboard:tabdat-graph-matrix-col-set! tabdat 1)
(dboard:tabdat-graph-matrix-row-set! tabdat (+ graph-matrix-row 1)))
(dboard:tabdat-graph-matrix-col-set! tabdat (+ graph-matrix-col 1)))
)))
(if (not (null? vals))
(let* (;; (maxval (apply max vals))
;; (minval (min 0 (apply min vals)))
(yoff (- minval lly)) ;; minval))
(deltaval (- maxval minval))
(yscale (/ delta-y (if (zero? deltaval) 1 deltaval)))
(yfunc (lambda (y)(+ lly (* yscale (- y minval))))) ;; (lambda (y)(* (+ y yoff) yscale))))
(graph-dat (hash-table-ref graph-matrix-table fieldn))
(graph-color (dboard:graph-dat-color graph-dat))
(graph-flag (dboard:graph-dat-flag graph-dat)))
(print "Value of " fieldn "graph is " graph-flag)
(if graph-flag
(begin
(vg:add-obj-to-comp
cmp
(vg:make-text-obj (- llx 10)(yfunc maxval) (conc maxval)))
(vg:add-obj-to-comp
cmp
|