Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion a

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
362 changes: 200 additions & 162 deletions lightweight_charts/abstract.py

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions lightweight_charts/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import webview
from webview.errors import JavascriptException

from lightweight_charts import abstract
from .util import parse_event_message, FLOAT

from .abstract import AbstractChart, Window, INDEX
import os
import threading

Expand Down Expand Up @@ -49,7 +48,7 @@

self.windows.append(webview.create_window(
title,
url=abstract.INDEX,
url=INDEX,
js_api=self.callback_api,
width=width,
height=height,
Expand Down Expand Up @@ -147,7 +146,7 @@
self._reset()


class Chart(abstract.AbstractChart):
class Chart(AbstractChart):

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing class docstring Warning

Missing class docstring

Check warning

Code scanning / Pylint (reported by Codacy)

Missing class docstring Warning

Missing class docstring
_main_window_handlers = None
WV: WebviewHandler = WebviewHandler()

Expand Down Expand Up @@ -175,21 +174,21 @@
width, height, x, y, screen, on_top, maximize, title
)

window = abstract.Window(
window = Window(
script_func=lambda s: Chart.WV.evaluate_js(self._i, s),
js_api_code='pywebview.api.callback'
)

abstract.Window._return_q = Chart.WV.return_queue
Window._return_q = Chart.WV.return_queue

Check notice

Code scanning / Pylint (reported by Codacy)

Access to a protected member _return_q of a client class Note

Access to a protected member _return_q of a client class

self.is_alive = True

if Chart._main_window_handlers is None:
super().__init__(window, inner_width, inner_height, scale_candles_only, toolbox, position=position, defaults= defaults)
super().__init__(window, inner_width, inner_height, scale_candles_only, toolbox, position=position, defaults= defaults, scripts = scripts)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (150/100) Warning

Line too long (150/100)

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (150/100) Warning

Line too long (150/100)

Check warning

Code scanning / Pylint (reported by Codacy)

No space allowed after keyword argument assignment Warning

No space allowed after keyword argument assignment

Check warning

Code scanning / Pylint (reported by Codacy)

No space allowed around keyword argument assignment Warning

No space allowed around keyword argument assignment
Chart._main_window_handlers = self.win.handlers
else:
window.handlers = Chart._main_window_handlers
super().__init__(window, inner_width, inner_height, scale_candles_only, toolbox, position=position, defaults= defaults)
super().__init__(window, inner_width, inner_height, scale_candles_only, toolbox, position=position, defaults= defaults, scripts = scripts)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (150/100) Warning

Line too long (150/100)

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (150/100) Warning

Line too long (150/100)

Check warning

Code scanning / Pylint (reported by Codacy)

No space allowed after keyword argument assignment Warning

No space allowed after keyword argument assignment

Check warning

Code scanning / Pylint (reported by Codacy)

No space allowed around keyword argument assignment Warning

No space allowed around keyword argument assignment

def show(self, block: bool = False):
"""
Expand Down
5 changes: 2 additions & 3 deletions lightweight_charts/js/bundle.js

Large diffs are not rendered by default.

24 changes: 23 additions & 1 deletion lightweight_charts/js/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
position: absolute;
z-index: 2000;
display: flex;
align-items: center;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
top: 25%;
border: 2px solid var(--border-color);
border-left: none;
Expand Down Expand Up @@ -59,7 +59,7 @@

.context-menu {
position: absolute;
z-index: 1000;
z-index: 10000;
background: rgb(50, 50, 50);
color: var(--active-color);
display: none;
Expand All @@ -69,7 +69,7 @@
cursor: default;
}
.context-menu-item {
display: flex;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
align-items: center;
justify-content: space-between;
padding: 2px 10px;
Expand All @@ -84,7 +84,7 @@
max-width: 170px;
background-color: var(--bg-color);
position: absolute;
z-index: 10000;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
display: none;
flex-direction: column;
align-items: center;
Expand Down Expand Up @@ -223,6 +223,28 @@
display: none;
flex-direction: column;
}

.legend-action-button {

Check warning

Code scanning / Csslint (reported by Codacy)

Rule doesn't have all its properties in alphabetical order. Warning

Rule doesn't have all its properties in alphabetical order.
background: none;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
border: none;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
padding: 0;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
font-size: 1em;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected newline after ";" in a multi-line declaration block (declaration-block-semicolon-newline-after) Warning

Expected newline after ";" in a multi-line declaration block (declaration-block-semicolon-newline-after)

Check warning

Code scanning / Stylelint (reported by Codacy)

Unexpected whitespace at end of line (no-eol-whitespace) Warning

Unexpected whitespace at end of line (no-eol-whitespace)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
cursor: pointer;

transition: color 0.2s ease, background-color 0.2s ease;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Unexpected empty line before declaration (declaration-empty-line-before) Warning

Unexpected empty line before declaration (declaration-empty-line-before)
width: 24px;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
height: 24px;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
display: flex;
align-items: center;
justify-content: center;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
border-radius: 4px;

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
}

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
.legend-action-button:hover {

background-color: #eaeaea;

Check warning

Code scanning / Stylelint (reported by Codacy)

Unexpected empty line before declaration (declaration-empty-line-before) Warning

Unexpected empty line before declaration (declaration-empty-line-before)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
}

.series-container {
display: flex;
flex-direction: column;
Expand Down
1 change: 0 additions & 1 deletion lightweight_charts_/js/bundle.js

This file was deleted.

24 changes: 0 additions & 24 deletions lightweight_charts_/js/index.html

This file was deleted.

7 changes: 0 additions & 7 deletions lightweight_charts_/js/lightweight-charts.js

This file was deleted.

244 changes: 0 additions & 244 deletions lightweight_charts_/js/styles.css

This file was deleted.

Loading