You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turning off lines in the legend call should maintain after a window resize.
Current Behaviour
I'm using both pyside6 and the native chart.
And I'm trying to figure out what's causing some chart flicker on pyside6 while using update_from_tick.
I turned off the legend lines - then resized the window and it comes back.
Then I set visible to False and the lines legend returns after a window resize.
Both pyside6 and native have this behavior.
Reproducible Example
importpandasaspdfromlightweight_chartsimportChartdefcalculate_sma(df, period: int=50):
returnpd.DataFrame({
'time': df['date'],
f'SMA {period}': df['close'].rolling(window=period).mean()
}).dropna()
if__name__=='__main__':
chart=Chart()
chart.legend(visible=True)
# df = pd.read_csv('ohlcv.csv')df=pd.read_csv('lw_charts_data/ohlc.csv')
chart.set(df)
line=chart.create_line('SMA 50')
# line = chart.create_line('SMA 50', price_line=False, price_label=False) # same behaviorsma_data=calculate_sma(df, period=50)
line.set(sma_data)
chart.legend(visible=False) # turns off everything - comes back on resize# chart.legend(visible=True, lines=False) # doesn't turn off legend for lineschart.show(block=True)
--resizewindowwithmouse--
Environment
- OS: win 11
- Library: 1.0.18.5
The text was updated successfully, but these errors were encountered:
- Added the `color_based_on_candle` parameter to the legend, which will color the percentage change based on the candle color underneath the crosshair.
(#210)
- Fixed a bug which prevented the legend from turning off. (#216)
Expected Behavior
Turning off lines in the legend call should maintain after a window resize.
Current Behaviour
I'm using both pyside6 and the native chart.
And I'm trying to figure out what's causing some chart flicker on pyside6 while using update_from_tick.
I turned off the legend lines - then resized the window and it comes back.
Then I set visible to False and the lines legend returns after a window resize.
Both pyside6 and native have this behavior.
Reproducible Example
Environment
The text was updated successfully, but these errors were encountered: