@@ -337,8 +337,9 @@ def overlay_viewlists(
337
337
338
338
# determine start datum in view
339
339
in_view = viz .vs .in_view
340
- if not in_view .size :
341
- log .warning (f'{ viz .name } not in view?' )
340
+ if in_view .size < 2 :
341
+ if debug_print :
342
+ print (f'{ viz .name } not in view?' )
342
343
continue
343
344
344
345
row_start = in_view [0 ]
@@ -501,6 +502,8 @@ def overlay_viewlists(
501
502
)
502
503
profiler (f'{ viz .name } @{ chart_name } yrange scan complete' )
503
504
505
+ # __ END OF scan phase (loop) __
506
+
504
507
# NOTE: if no there were no overlay charts
505
508
# detected/collected (could be either no group detected or
506
509
# chart with a single symbol, thus a single viz/overlay)
@@ -610,10 +613,8 @@ def overlay_viewlists(
610
613
) = overlay_table [full_disp ]
611
614
612
615
key = 'open' if viz .is_ohlc else viz .name
613
-
614
616
xref = minor_in_view [0 ]['time' ]
615
617
match method :
616
-
617
618
# Pin this curve to the "major dispersion" (or other
618
619
# target) curve:
619
620
#
@@ -667,21 +668,27 @@ def overlay_viewlists(
667
668
f'yref@xref_pin: { yref } \n '
668
669
)
669
670
671
+ mx_scalars = mx_viz .scalars_from_index (xref )
672
+ if mx_scalars is None :
673
+ continue
674
+
670
675
(
671
676
i_start ,
672
677
y_ref_major ,
673
678
r_up_from_major_at_xref ,
674
679
r_down_from_major_at_xref ,
675
- ) = mx_viz . scalars_from_index ( xref )
680
+ ) = mx_scalars
676
681
677
682
if debug_print :
678
683
print (
679
684
'MAJOR PIN SCALING\n '
680
685
f'mx_xref: { mx_xref } \n '
681
686
f'major i_start: { i_start } \n '
682
687
f'y_ref_major: { y_ref_major } \n '
683
- f'r_up_from_major_at_xref { r_up_from_major_at_xref } \n '
684
- f'r_down_from_major_at_xref: { r_down_from_major_at_xref } \n '
688
+ f'r_up_from_major_at_xref '
689
+ f'{ r_up_from_major_at_xref } \n '
690
+ f'r_down_from_major_at_xref: '
691
+ f'{ r_down_from_major_at_xref } \n '
685
692
f'-----to minor-----\n '
686
693
f'xref: { xref } \n '
687
694
f'y_start: { y_start } \n '
@@ -711,8 +718,10 @@ def overlay_viewlists(
711
718
712
719
if debug_print :
713
720
print (
714
- f'RESCALE { mx_viz .name } DUE TO { viz .name } ymn -> { y_min } \n '
715
- f'-> MAJ ymn (w r_down: { r_dn_minor } ) -> { mx_ymn } \n \n '
721
+ f'RESCALE { mx_viz .name } DUE TO { viz .name } '
722
+ f'ymn -> { y_min } \n '
723
+ f'-> MAJ ymn (w r_down: { r_dn_minor } ) '
724
+ f'-> { mx_ymn } \n \n '
716
725
)
717
726
# rescale all already scaled curves to new
718
727
# increased range for this side as
@@ -753,8 +762,10 @@ def overlay_viewlists(
753
762
754
763
if debug_print :
755
764
print (
756
- f'RESCALE { mx_viz .name } DUE TO { viz .name } ymx -> { y_max } \n '
757
- f'-> MAJ ymx (r_up: { r_up_minor } -> { mx_ymx } \n \n '
765
+ f'RESCALE { mx_viz .name } DUE TO { viz .name } '
766
+ f'ymx -> { y_max } \n '
767
+ f'-> MAJ ymx (r_up: { r_up_minor } '
768
+ f'-> { mx_ymx } \n \n '
758
769
)
759
770
760
771
for _view in scaled :
@@ -815,6 +826,13 @@ def overlay_viewlists(
815
826
f'overlay ``method`` is invalid `{ method } '
816
827
)
817
828
829
+ # __ END OF transform calc phase (loop) __
830
+
831
+ # finally, scale the major target/dispersion curve to
832
+ # the (possibly re-scaled/modified) values were set in
833
+ # transform phase loop.
834
+ mx_view ._set_yrange (yrange = (mx_ymn , mx_ymx ))
835
+
818
836
if scaled :
819
837
if debug_print :
820
838
print (
@@ -861,10 +879,7 @@ def overlay_viewlists(
861
879
'--------------------------------\n '
862
880
)
863
881
864
- # finally, scale the major target/dispersion curve to
865
- # the (possibly re-scaled/modified) values were set in
866
- # transform phase loop.
867
- mx_view ._set_yrange (yrange = (mx_ymn , mx_ymx ))
882
+ # __ END OF overlay scale phase (loop) __
868
883
869
884
if debug_print :
870
885
print (
0 commit comments