Draw last datums on boot
Ensures that a "last datum" graphics object exists so that zooming can read it using `.x_last()`. Also, disable the linked region stuff for now since it's totally borked after flipping to the time indexing.pre_viz_calls
							parent
							
								
									4ad9d52bd7
								
							
						
					
					
						commit
						163d41ec91
					
				| 
						 | 
					@ -1202,6 +1202,13 @@ async def display_symbol_data(
 | 
				
			||||||
            # sidepane=False,
 | 
					            # sidepane=False,
 | 
				
			||||||
            sidepane=godwidget.search,
 | 
					            sidepane=godwidget.search,
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # ensure the last datum graphic is generated
 | 
				
			||||||
 | 
					        # for zoom-interaction purposes.
 | 
				
			||||||
 | 
					        hist_chart.get_viz(fqsn).draw_last(
 | 
				
			||||||
 | 
					            array_key=fqsn,
 | 
				
			||||||
 | 
					            only_last_uppx=True,
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
        pis.setdefault(fqsn, [None, None])[1] = hist_chart.plotItem
 | 
					        pis.setdefault(fqsn, [None, None])[1] = hist_chart.plotItem
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # don't show when not focussed
 | 
					        # don't show when not focussed
 | 
				
			||||||
| 
						 | 
					@ -1295,6 +1302,13 @@ async def display_symbol_data(
 | 
				
			||||||
                    last_bar_color=bg_last_bar_color,
 | 
					                    last_bar_color=bg_last_bar_color,
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                # ensure the last datum graphic is generated
 | 
				
			||||||
 | 
					                # for zoom-interaction purposes.
 | 
				
			||||||
 | 
					                viz.draw_last(
 | 
				
			||||||
 | 
					                    array_key=fqsn,
 | 
				
			||||||
 | 
					                    only_last_uppx=True,
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                hist_pi.vb.maxmin = partial(
 | 
					                hist_pi.vb.maxmin = partial(
 | 
				
			||||||
                    hist_chart.maxmin,
 | 
					                    hist_chart.maxmin,
 | 
				
			||||||
                    name=fqsn,
 | 
					                    name=fqsn,
 | 
				
			||||||
| 
						 | 
					@ -1406,11 +1420,12 @@ async def display_symbol_data(
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
                godwidget.resize_all()
 | 
					                godwidget.resize_all()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            await link_views_with_region(
 | 
					            # hist_chart.hide()
 | 
				
			||||||
                rt_chart,
 | 
					            # await link_views_with_region(
 | 
				
			||||||
                hist_chart,
 | 
					            #     rt_chart,
 | 
				
			||||||
                flume,
 | 
					            #     hist_chart,
 | 
				
			||||||
            )
 | 
					            #     flume,
 | 
				
			||||||
 | 
					            # )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # start graphics update loop after receiving first live quote
 | 
					            # start graphics update loop after receiving first live quote
 | 
				
			||||||
            ln.start_soon(
 | 
					            ln.start_soon(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue