From 644a2994dcc101c8b269af21f563e65c37e4ce35 Mon Sep 17 00:00:00 2001 From: David Payne Date: Mon, 19 Feb 2018 20:11:11 -0800 Subject: [PATCH 1/3] Fix highstock to add SMA and flags.allowOverlapX --- highcharts/highstock/highstock.py | 1 + highcharts/highstock/highstock_types.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/highcharts/highstock/highstock.py b/highcharts/highstock/highstock.py index 659d032..e94a8c9 100644 --- a/highcharts/highstock/highstock.py +++ b/highcharts/highstock/highstock.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals, absolute_import from future.standard_library import install_aliases install_aliases() +from past.builtins import basestring from jinja2 import Environment, PackageLoader diff --git a/highcharts/highstock/highstock_types.py b/highcharts/highstock/highstock_types.py index 83e76c6..b5b31b1 100644 --- a/highcharts/highstock/highstock_types.py +++ b/highcharts/highstock/highstock_types.py @@ -211,6 +211,7 @@ "turboThreshold": int, }, "flags": { + "allowOverlapX": bool, "colors": list, "cropThreshold": int, "keys": list, @@ -350,6 +351,25 @@ "stacking": basestring, "turboThreshold": int, }, + "sma": { + "allowPointSelect": bool, + "borderWidth": [int, basestring], + "connectEnds": bool, + "connectNulls": bool, + "cropThreshold": int, + "dashStyle": basestring, + "lineWidth": int, + "linkedTo": basestring, + "marker": (Marker, dict), + "negativeColor": (ColorObject, basestring, dict), + "params": dict, + "pointInterval": int, + "pointPlacement": [basestring, int, float], + "pointStart": [int, basestring, datetime.datetime], + "shadow": [bool, dict], + "stacking": basestring, + "turboThreshold": int, + }, } DATA_SERIES_ALLOWED_OPTIONS = { From 22f812d79a7d758968125b6f095925262d3462d0 Mon Sep 17 00:00:00 2001 From: David Payne Date: Mon, 19 Feb 2018 20:12:49 -0800 Subject: [PATCH 2/3] Add Rangeselector floating options. --- highcharts/highstock/options.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/highcharts/highstock/options.py b/highcharts/highstock/options.py index 4a21318..62e3226 100644 --- a/highcharts/highstock/options.py +++ b/highcharts/highstock/options.py @@ -320,6 +320,7 @@ class RangeSelectorOptions(BaseOptions): "buttonTheme": (SVGObject, dict), "buttons": (Buttons, list), "enabled": bool, + "floating": bool, "inputBoxBorderColor": (ColorObject, basestring, dict), "inputBoxHeight": [int, float], "inputBoxWidth": [int, float], @@ -331,6 +332,8 @@ class RangeSelectorOptions(BaseOptions): "inputStyle": (CSSObject, dict), "labelStyle": (CSSObject, dict), "selected": [int, float], + "x": int, + "y": int, } class ScrollbarOptions(BaseOptions): From 47899d39a643b0d404511cd37e6bca11d1eeba86 Mon Sep 17 00:00:00 2001 From: David Payne Date: Mon, 19 Feb 2018 21:21:06 -0800 Subject: [PATCH 3/3] Add boost --- highcharts/highstock/highstock.py | 3 ++- highcharts/highstock/options.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/highcharts/highstock/highstock.py b/highcharts/highstock/highstock.py index e94a8c9..0b5c4c0 100644 --- a/highcharts/highstock/highstock.py +++ b/highcharts/highstock/highstock.py @@ -12,7 +12,7 @@ import datetime import html from collections import Iterable -from .options import BaseOptions, ChartOptions, \ +from .options import BaseOptions, BoostOptions, ChartOptions, \ ColorsOptions, CreditsOptions, ExportingOptions, \ GlobalOptions, LabelsOptions, LangOptions, \ LegendOptions, LoadingOptions, NavigatorOptions, NavigationOptions, \ @@ -111,6 +111,7 @@ def __init__(self, **kwargs): # Bind Base Classes to self self.options = { + "boost": BoostOptions(), "chart": ChartOptions(), "colors": ColorsOptions(), "credits": CreditsOptions(), diff --git a/highcharts/highstock/options.py b/highcharts/highstock/options.py index 62e3226..d9e2018 100644 --- a/highcharts/highstock/options.py +++ b/highcharts/highstock/options.py @@ -110,6 +110,16 @@ def __getattr__(self, item): return True + +class BoostOptions(BaseOptions): + ALLOWED_OPTIONS = { + "allowForce": bool, + "debug": dict, + "enabled": bool, + "seriesThreshold": int, + "useGPUTranslations": bool, + } + class ChartOptions(BaseOptions): ALLOWED_OPTIONS = { "alignTicks": bool, @@ -412,6 +422,7 @@ class TooltipOptions(BaseOptions): "shadow": bool, "shared": bool, "snap": int, + "split": bool, "style": (CSSObject, dict), "useHTML": bool, "valueDecimals": int,