Skip to content

Commit

Permalink
Merge pull request #33 from mistercrunch/nvd3
Browse files Browse the repository at this point in the history
Adding nvd3 support
  • Loading branch information
mistercrunch committed Sep 27, 2015
2 parents 703b6f6 + 89e9290 commit 4c78b4f
Show file tree
Hide file tree
Showing 7 changed files with 872 additions and 2 deletions.
20 changes: 19 additions & 1 deletion panoramix/forms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from wtforms import (
Field, Form, SelectMultipleField, SelectField, TextField, TextAreaField)
Field, Form, SelectMultipleField, SelectField, TextField, TextAreaField,
BooleanField)
from copy import copy


Expand Down Expand Up @@ -104,6 +105,21 @@ def form_factory(viz):
"Font Size To",
default="150",
description="Font size for the biggest value in the list"),
'show_brush': BooleanField(
"Range Selector", default=True,
description="Whether to display the time range interactive selector"),
'show_legend': BooleanField(
"Legend", default=True,
description="Whether to display the legend (toggles)"),
'rich_tooltip': BooleanField(
"Rich Tooltip", default=True,
description="The rich tooltip shows a list of all series for that point in time"),
'y_axis_zero': BooleanField(
"Y Axis Zero", default=False,
description="Force the Y axis to start at 0 instead of the minimum value"),
'y_log_scale': BooleanField(
"Y Log", default=False,
description="Use a log scale for the Y axis"),
}
field_css_classes = {k: ['form-control'] for k in px_form_fields.keys()}
select2 = [
Expand All @@ -114,6 +130,8 @@ def form_factory(viz):
field_css_classes['since'] += ['select2_free_since']
field_css_classes['until'] += ['select2_free_until']
field_css_classes['granularity'] += ['select2_free_granularity']
for field in ('show_brush', 'show_legend', 'rich_tooltip'):
field_css_classes[field] += ['input-sm']
for field in select2:
field_css_classes[field] += ['select2']

Expand Down
Loading

0 comments on commit 4c78b4f

Please sign in to comment.