Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost support. #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion highcharts/highstock/highstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -11,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, \
Expand Down Expand Up @@ -110,6 +111,7 @@ def __init__(self, **kwargs):

# Bind Base Classes to self
self.options = {
"boost": BoostOptions(),
"chart": ChartOptions(),
"colors": ColorsOptions(),
"credits": CreditsOptions(),
Expand Down
20 changes: 20 additions & 0 deletions highcharts/highstock/highstock_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
"turboThreshold": int,
},
"flags": {
"allowOverlapX": bool,
"colors": list,
"cropThreshold": int,
"keys": list,
Expand Down Expand Up @@ -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 = {
Expand Down
14 changes: 14 additions & 0 deletions highcharts/highstock/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -320,6 +330,7 @@ class RangeSelectorOptions(BaseOptions):
"buttonTheme": (SVGObject, dict),
"buttons": (Buttons, list),
"enabled": bool,
"floating": bool,
"inputBoxBorderColor": (ColorObject, basestring, dict),
"inputBoxHeight": [int, float],
"inputBoxWidth": [int, float],
Expand All @@ -331,6 +342,8 @@ class RangeSelectorOptions(BaseOptions):
"inputStyle": (CSSObject, dict),
"labelStyle": (CSSObject, dict),
"selected": [int, float],
"x": int,
"y": int,
}

class ScrollbarOptions(BaseOptions):
Expand Down Expand Up @@ -409,6 +422,7 @@ class TooltipOptions(BaseOptions):
"shadow": bool,
"shared": bool,
"snap": int,
"split": bool,
"style": (CSSObject, dict),
"useHTML": bool,
"valueDecimals": int,
Expand Down