seolpyo-mplchart 1.4.0__py3-none-any.whl → 1.4.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of seolpyo-mplchart might be problematic. Click here for more details.

@@ -1,6 +1,5 @@
1
1
  from fractions import Fraction
2
2
 
3
- import matplotlib.pyplot as plt
4
3
  from matplotlib.backend_bases import MouseEvent
5
4
  from matplotlib.collections import LineCollection
6
5
  from matplotlib.text import Text
@@ -277,7 +276,7 @@ class CrossLineMixin(EventMixin):
277
276
  self.artist_text_price.set_y(y)
278
277
  self.artist_text_price.draw(renderer)
279
278
 
280
- if self.intx:
279
+ if self.intx is not None:
281
280
  # 기준시간 표시
282
281
  self.artist_text_date_volume.set_text(f'{self.df[self.date][self.intx]}')
283
282
  self.artist_text_date_volume.set_x(x)
@@ -289,7 +288,7 @@ class CrossLineMixin(EventMixin):
289
288
  self.artist_text_volume.set_y(y)
290
289
  self.artist_text_volume.draw(renderer)
291
290
 
292
- if self.intx:
291
+ if self.intx is not None:
293
292
  # 기준시간 표시
294
293
  self.artist_text_date_price.set_text(f'{self.df[self.date][self.intx]}')
295
294
  self.artist_text_date_price.set_x(x)
@@ -307,7 +306,7 @@ class BoxMixin(CrossLineMixin):
307
306
  y = e.ydata
308
307
 
309
308
  renderer = self.figure.canvas.renderer
310
- if self.intx:
309
+ if self.intx is not None:
311
310
  if in_price_chart:
312
311
  # 박스 크기
313
312
  high = self.df['top_box_candle'][self.intx]
@@ -386,12 +385,15 @@ class InfoMixin(BoxMixin):
386
385
  super().set_data(df, sort_df, calc_ma, set_candlecolor, set_volumecolor, calc_info, *args, **kwargs)
387
386
 
388
387
  self._length_text = self.df[(self.volume if self.volume else self.high)].apply(lambda x: len(f'{x:,}')).max()
388
+ lenth_high = self.df[self.high].apply(lambda x: len(f'{x:,}')).max()
389
+ lenth_volume = 0 if not self.volume else self.df[self.volume].apply(lambda x: len(f'{x:,}')).max()
390
+ self._length_text = lenth_high if lenth_volume < lenth_high else lenth_volume
389
391
  return
390
392
 
391
393
  def _draw_box_artist(self, e, in_price_chart):
392
394
  super()._draw_box_artist(e, in_price_chart)
393
395
 
394
- if self.intx:
396
+ if self.intx is not None:
395
397
  if self.in_candle: self._draw_candle_info_artist(e)
396
398
  elif self.in_volumebar: self._draw_volume_info_artist(e)
397
399
  return
@@ -3,7 +3,6 @@ from matplotlib.axes import Axes
3
3
  from matplotlib.collections import LineCollection
4
4
  from matplotlib.text import Text
5
5
  from matplotlib.backend_bases import MouseEvent, MouseButton, cursors
6
- import pandas as pd
7
6
 
8
7
  from ._base import convert_unit
9
8
  from ._cursor import BaseMixin as BM, Mixin as M
@@ -282,6 +281,16 @@ class MouseMoveMixin(BackgroundMixin):
282
281
  in_slider = False
283
282
  is_click_slider = False
284
283
 
284
+ def _erase_crossline(self):
285
+ boolen = super()._erase_crossline()
286
+ if boolen: return boolen
287
+
288
+ seg = self.collection_slider_vline.get_segments()
289
+ if seg:
290
+ self.collection_slider_vline.set_segments([])
291
+ return True
292
+ return False
293
+
285
294
  def _on_move(self, e):
286
295
  self._on_move_action(e)
287
296
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: seolpyo-mplchart
3
- Version: 1.4.0
3
+ Version: 1.4.0.2
4
4
  Summary: Fast candlestick chart using Python. Includes navigator, slider, navigation, and text information display functions
5
5
  Author-email: white-seolpyo <white-seolpyo@naver.com>
6
6
  License: MIT License
@@ -1,8 +1,8 @@
1
1
  seolpyo_mplchart/__init__.py,sha256=1rY6PP1OMMr1d_5x7dlAD2ImQAXChT5spvB45j6yDp8,18255
2
2
  seolpyo_mplchart/_base.py,sha256=3iG4AVwHR_h3rh6c1oJahWt7NvBpBFrS0bUZd4PaHfY,3921
3
- seolpyo_mplchart/_cursor.py,sha256=tWna4dRlHImM9XzwDHvcFn8vdR1P97JWSYYTmGpb02E,22473
3
+ seolpyo_mplchart/_cursor.py,sha256=XsDrGIH9_5cAJBFfjIaAZrSm3CK_LLQr4ZPACN6rR9w,22761
4
4
  seolpyo_mplchart/_draw.py,sha256=TGPo80yJocmXbWoCfzYKlWK6ntBElvb9IR8O54A2X5w,21174
5
- seolpyo_mplchart/_slider.py,sha256=9h_4svjmCtGHUf2LwEJUYtsiR3UBE8JrwWv7EhsVCLQ,23118
5
+ seolpyo_mplchart/_slider.py,sha256=W6YGzm9dJ81YnwxDeu5QBqYWV9ec5pRmS9hyTWQ8R0c,23395
6
6
  seolpyo_mplchart/base.py,sha256=0qdImsIMPzTTkkHzPv479BVe_ojrn45FidGE46eT5x4,3797
7
7
  seolpyo_mplchart/cursor.py,sha256=qq1WJJa7vCE5C2XeGBECt2XqxR_WxfybZZ5u6zVx5Ps,20415
8
8
  seolpyo_mplchart/draw.py,sha256=MiqDhbMJOSlWD6qdAghsyrZwCixcwm4nfmiinvwtt-o,21520
@@ -11,7 +11,7 @@ seolpyo_mplchart/test.py,sha256=TFnIXphJsl-B7iIhBh7-PZKUz2Gjh7mwNwrk8aUS4SA,180
11
11
  seolpyo_mplchart/utils.py,sha256=a3XycRBTndrsjBw_1VKTxbSvOGpVYXHRK87v7azgRe8,1433
12
12
  seolpyo_mplchart/data/apple.txt,sha256=0izAfweu1lLsC0IwVthdVlo9reG8KGbKGTSX5knI5Zc,1380864
13
13
  seolpyo_mplchart/data/samsung.txt,sha256=UejaSkbzr4E5K3lkelCT0yJiWUPfmViBEaTyoXyphIs,2476424
14
- seolpyo_mplchart-1.4.0.dist-info/METADATA,sha256=4iLKujOaFP2BLDopSwsvsKYPEoD81CMUFWZjf6t80Fc,2482
15
- seolpyo_mplchart-1.4.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
16
- seolpyo_mplchart-1.4.0.dist-info/top_level.txt,sha256=KgqFn7rKWize7OjMaTCHxKm9ie6vqnyb5c8fN7y_tSo,17
17
- seolpyo_mplchart-1.4.0.dist-info/RECORD,,
14
+ seolpyo_mplchart-1.4.0.2.dist-info/METADATA,sha256=nWTt9BzTj28RNRUdAJY_-PBKsIX03m4X7tm3C7wNNlw,2484
15
+ seolpyo_mplchart-1.4.0.2.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
16
+ seolpyo_mplchart-1.4.0.2.dist-info/top_level.txt,sha256=KgqFn7rKWize7OjMaTCHxKm9ie6vqnyb5c8fN7y_tSo,17
17
+ seolpyo_mplchart-1.4.0.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (76.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5