New Feature: Multi-Pane Charts

- Added the create_subchart method to Chart.
- Added the SubChart class.
- Added an inner_width and inner_height parameter to Chart.
- The time_scale method can now disable the time scale completely.

Bugs:
- Fixed a bug which prevented markers from being placed on charts with a timescale less than a day.
This commit is contained in:
louisnw
2023-05-18 23:14:04 +01:00
parent 0f061ae803
commit 6237cf4d5a
7 changed files with 420 additions and 161 deletions

View File

@ -12,6 +12,21 @@ class MissingColumn(KeyError):
return f'{self.msg}'
class ColorError(ValueError):
def __init__(self, message):
super().__init__(message)
self.msg = message
def __str__(self):
return f'{self.msg}'
def _valid_color(string):
if string[:3] == 'rgb' or string[:4] == 'rgba' or string[0] == '#':
return True
raise ColorError('Colors must be in the format of either rgb, rgba or hex.')
LINE_TYPE = Literal['solid', 'dotted', 'dashed', 'large_dashed', 'sparse_dotted']
POSITION = Literal['above', 'below', 'inside']