seolpyo-mplchart 1.4.1.2__tar.gz → 1.4.1.3__tar.gz
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.
- {seolpyo_mplchart-1.4.1.2/seolpyo_mplchart.egg-info → seolpyo_mplchart-1.4.1.3}/PKG-INFO +4 -3
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/README.md +3 -2
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/pyproject.toml +1 -1
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart/_cursor.py +19 -18
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart/_slider.py +4 -4
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart/test.py +2 -2
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3/seolpyo_mplchart.egg-info}/PKG-INFO +4 -3
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/MANIFEST.in +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart/__init__.py +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart/_base.py +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart/_draw.py +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart/utils.py +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart.egg-info/SOURCES.txt +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart.egg-info/dependency_links.txt +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart.egg-info/requires.txt +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart.egg-info/top_level.txt +0 -0
- {seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seolpyo-mplchart
|
|
3
|
-
Version: 1.4.1.
|
|
3
|
+
Version: 1.4.1.3
|
|
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
|
|
@@ -50,8 +50,9 @@ Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
|
|
|
50
50
|
## Korean format sample
|
|
51
51
|

|
|
52
52
|
|
|
53
|
-
## change Candle shape sample
|
|
53
|
+
## change Candle shape sample(draw Bar Chart)
|
|
54
54
|

|
|
55
55
|
|
|
56
|
-
# 40,000
|
|
56
|
+
# Mass Data Testing (40,000 Stock Price Data Points)
|
|
57
57
|

|
|
58
|
+
|
|
@@ -23,8 +23,9 @@ Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
|
|
|
23
23
|
## Korean format sample
|
|
24
24
|

|
|
25
25
|
|
|
26
|
-
## change Candle shape sample
|
|
26
|
+
## change Candle shape sample(draw Bar Chart)
|
|
27
27
|

|
|
28
28
|
|
|
29
|
-
# 40,000
|
|
29
|
+
# Mass Data Testing (40,000 Stock Price Data Points)
|
|
30
30
|

|
|
31
|
+
|
|
@@ -234,7 +234,7 @@ class CrossLineMixin(EventMixin):
|
|
|
234
234
|
|
|
235
235
|
if self.in_price_chart or self.in_volume_chart:
|
|
236
236
|
self._restore_region()
|
|
237
|
-
self._draw_crossline(e
|
|
237
|
+
self._draw_crossline(e)
|
|
238
238
|
self.figure.canvas.blit()
|
|
239
239
|
else:
|
|
240
240
|
if self._erase_crossline():
|
|
@@ -249,10 +249,10 @@ class CrossLineMixin(EventMixin):
|
|
|
249
249
|
return True
|
|
250
250
|
return False
|
|
251
251
|
|
|
252
|
-
def _draw_crossline(self, e: MouseEvent
|
|
252
|
+
def _draw_crossline(self, e: MouseEvent):
|
|
253
253
|
x, y = (e.xdata, e.ydata)
|
|
254
254
|
|
|
255
|
-
if in_price_chart:
|
|
255
|
+
if self.in_price_chart:
|
|
256
256
|
self.collection_price_crossline.set_segments([((x, self.price_ymin), (x, self.price_ymax)), ((self.vxmin, y), (self.vxmax, y))])
|
|
257
257
|
self.collection_volume_crossline.set_segments([((x, 0), (x, self.volume_ymax))])
|
|
258
258
|
else:
|
|
@@ -263,14 +263,14 @@ class CrossLineMixin(EventMixin):
|
|
|
263
263
|
self.collection_price_crossline.draw(renderer)
|
|
264
264
|
self.collection_volume_crossline.draw(renderer)
|
|
265
265
|
|
|
266
|
-
self._draw_text_artist(e
|
|
266
|
+
self._draw_text_artist(e)
|
|
267
267
|
return
|
|
268
268
|
|
|
269
|
-
def _draw_text_artist(self, e: MouseEvent
|
|
269
|
+
def _draw_text_artist(self, e: MouseEvent):
|
|
270
270
|
x, y = (e.xdata, e.ydata)
|
|
271
271
|
|
|
272
272
|
renderer = self.figure.canvas.renderer
|
|
273
|
-
if in_price_chart:
|
|
273
|
+
if self.in_price_chart:
|
|
274
274
|
# 가격
|
|
275
275
|
self.artist_text_price.set_text(f'{float_to_str(y, self.digit_price)}{self.unit_price}')
|
|
276
276
|
self.artist_text_price.set_x(self.v0 if self.veighth < x else self.vsixth)
|
|
@@ -298,17 +298,20 @@ class CrossLineMixin(EventMixin):
|
|
|
298
298
|
|
|
299
299
|
|
|
300
300
|
class BoxMixin(CrossLineMixin):
|
|
301
|
-
def _draw_crossline(self, e
|
|
302
|
-
super()._draw_crossline(e
|
|
303
|
-
self._draw_box_artist(e
|
|
301
|
+
def _draw_crossline(self, e):
|
|
302
|
+
super()._draw_crossline(e)
|
|
303
|
+
self._draw_box_artist(e)
|
|
304
304
|
return
|
|
305
305
|
|
|
306
|
-
def _draw_box_artist(self, e: MouseEvent
|
|
306
|
+
def _draw_box_artist(self, e: MouseEvent):
|
|
307
307
|
y = e.ydata
|
|
308
308
|
|
|
309
309
|
renderer = self.figure.canvas.renderer
|
|
310
|
+
|
|
311
|
+
self.in_candle = False
|
|
312
|
+
self.in_volumebar = False
|
|
310
313
|
if self.intx is not None:
|
|
311
|
-
if in_price_chart:
|
|
314
|
+
if self.in_price_chart:
|
|
312
315
|
# 박스 크기
|
|
313
316
|
high = self.df['top_box_candle'][self.intx]
|
|
314
317
|
low = self.df['bottom_box_candle'][self.intx]
|
|
@@ -318,21 +321,19 @@ class BoxMixin(CrossLineMixin):
|
|
|
318
321
|
high, low = (high+sub, low-sub)
|
|
319
322
|
|
|
320
323
|
# 커서가 캔들 사이에 있는지 확인
|
|
321
|
-
if
|
|
322
|
-
else:
|
|
324
|
+
if low <= y and y <= high:
|
|
323
325
|
# 캔들 강조
|
|
324
326
|
self.in_candle = True
|
|
325
327
|
x1, x2 = (self.intx-0.3, self.intx+1.3)
|
|
326
328
|
self.collection_price_box.set_segments([((x1, high), (x2, high), (x2, low), (x1, low), (x1, high))])
|
|
327
329
|
self.collection_price_box.draw(renderer)
|
|
328
|
-
elif self.volume:
|
|
330
|
+
elif self.in_volume_chart and self.volume:
|
|
329
331
|
# 거래량 강조
|
|
330
332
|
high = self.df['max_box_volume'][self.intx]
|
|
331
333
|
low = 0
|
|
332
334
|
if high < self.min_height_box_volume: high = self.min_height_box_volume
|
|
333
335
|
|
|
334
|
-
if
|
|
335
|
-
else:
|
|
336
|
+
if low <= y and y <= high:
|
|
336
337
|
self.in_volumebar = True
|
|
337
338
|
x1, x2 = (self.intx-0.3, self.intx+1.3)
|
|
338
339
|
self.collection_volume_box.set_segments([((x1, high), (x2, high), (x2, low), (x1, low), (x1, high))])
|
|
@@ -395,8 +396,8 @@ class InfoMixin(BoxMixin):
|
|
|
395
396
|
self._length_text = lenth_high if lenth_volume < lenth_high else lenth_volume
|
|
396
397
|
return
|
|
397
398
|
|
|
398
|
-
def _draw_box_artist(self, e
|
|
399
|
-
super()._draw_box_artist(e
|
|
399
|
+
def _draw_box_artist(self, e):
|
|
400
|
+
super()._draw_box_artist(e)
|
|
400
401
|
|
|
401
402
|
if self.intx is not None:
|
|
402
403
|
if self.in_candle: self._draw_candle_info_artist(e)
|
|
@@ -302,7 +302,7 @@ class MouseMoveMixin(BackgroundMixin):
|
|
|
302
302
|
self.figure.canvas.blit()
|
|
303
303
|
elif self.in_price_chart or self.in_volume_chart:
|
|
304
304
|
self._restore_region()
|
|
305
|
-
self._draw_crossline(e
|
|
305
|
+
self._draw_crossline(e)
|
|
306
306
|
self.figure.canvas.blit()
|
|
307
307
|
else:
|
|
308
308
|
if self._erase_crossline():
|
|
@@ -378,10 +378,10 @@ class MouseMoveMixin(BackgroundMixin):
|
|
|
378
378
|
self.artist_text_slider.draw(renderer)
|
|
379
379
|
return
|
|
380
380
|
|
|
381
|
-
def _draw_crossline(self, e: MouseEvent
|
|
381
|
+
def _draw_crossline(self, e: MouseEvent):
|
|
382
382
|
self.collection_slider_vline.set_segments([((e.xdata, self.slider_ymin), (e.xdata, self.slider_ymax))])
|
|
383
383
|
self.collection_slider_vline.draw(self.figure.canvas.renderer)
|
|
384
|
-
return super()._draw_crossline(e
|
|
384
|
+
return super()._draw_crossline(e)
|
|
385
385
|
|
|
386
386
|
|
|
387
387
|
class ClickMixin(MouseMoveMixin):
|
|
@@ -567,7 +567,7 @@ class ChartClickMixin(ReleaseMixin):
|
|
|
567
567
|
elif self.in_price_chart or self.in_volume_chart:
|
|
568
568
|
self._restore_region(self.is_click_chart)
|
|
569
569
|
if not self.is_click_chart:
|
|
570
|
-
self._draw_crossline(e
|
|
570
|
+
self._draw_crossline(e)
|
|
571
571
|
else: self._move_chart(e)
|
|
572
572
|
self.figure.canvas.blit()
|
|
573
573
|
else:
|
|
@@ -26,7 +26,7 @@ class Chart(mc.SliderChart):
|
|
|
26
26
|
kwargs['close'] = 'You can Change close price info.'
|
|
27
27
|
return kwargs
|
|
28
28
|
|
|
29
|
-
def
|
|
29
|
+
def get_candle_segment(self, *, x, left, right, top, bottom, is_up, high, low):
|
|
30
30
|
if is_up:
|
|
31
31
|
return (
|
|
32
32
|
(x, top), (right, top), (x, top),
|
|
@@ -53,7 +53,7 @@ path_file = Path(__file__).parent / 'sample/samsung.txt'
|
|
|
53
53
|
|
|
54
54
|
with open(path_file, 'r', encoding='utf-8') as txt:
|
|
55
55
|
data = json.load(txt)
|
|
56
|
-
df = pd.DataFrame(data[:
|
|
56
|
+
df = pd.DataFrame(data[:100])
|
|
57
57
|
|
|
58
58
|
C.set_data(df)
|
|
59
59
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seolpyo-mplchart
|
|
3
|
-
Version: 1.4.1.
|
|
3
|
+
Version: 1.4.1.3
|
|
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
|
|
@@ -50,8 +50,9 @@ Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
|
|
|
50
50
|
## Korean format sample
|
|
51
51
|

|
|
52
52
|
|
|
53
|
-
## change Candle shape sample
|
|
53
|
+
## change Candle shape sample(draw Bar Chart)
|
|
54
54
|

|
|
55
55
|
|
|
56
|
-
# 40,000
|
|
56
|
+
# Mass Data Testing (40,000 Stock Price Data Points)
|
|
57
57
|

|
|
58
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart.egg-info/requires.txt
RENAMED
|
File without changes
|
{seolpyo_mplchart-1.4.1.2 → seolpyo_mplchart-1.4.1.3}/seolpyo_mplchart.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|