Adding an option for line_interpolation in line chart
This commit is contained in:
parent
3f9c83828a
commit
bb535a373d
|
|
@ -126,6 +126,13 @@ class FormFactory(object):
|
|||
choices=[(s, s) for s in ['random', 'flat', 'square']],
|
||||
default="random",
|
||||
description="Rotation to apply to words in the cloud"),
|
||||
'line_interpolation': SelectField(
|
||||
"Line Interpolation",
|
||||
choices=[(s, s) for s in [
|
||||
'linear', 'basis', 'cardinal', 'monotone',
|
||||
'step-before', 'step-after']],
|
||||
default='linear',
|
||||
description="Line interpolation as defined by d3.js"),
|
||||
'code': TextAreaField("Code", description="Put your code here"),
|
||||
'size_from': TextField(
|
||||
"Font Size From",
|
||||
|
|
|
|||
|
|
@ -38,9 +38,11 @@ function viz_nvd3(token_name, json_callback) {
|
|||
.tickFormat(function (d) {return tickMultiFormat(UTC(new Date(d))); })
|
||||
.tickValues([]);
|
||||
chart.y2Axis.tickFormat(d3.format('.3s'));
|
||||
console.log(viz.form_data.line_interpolation);
|
||||
} else {
|
||||
var chart = nv.models.lineChart()
|
||||
}
|
||||
chart.interpolate(viz.form_data.line_interpolation);
|
||||
chart.xScale(d3.time.scale());
|
||||
chart.xAxis
|
||||
.showMaxMin(false)
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ class NVD3TimeSeriesViz(NVD3Viz):
|
|||
'metrics',
|
||||
'groupby', 'limit',
|
||||
('rolling_type', 'rolling_periods'),
|
||||
('num_period_compare', None),
|
||||
('num_period_compare', 'line_interpolation'),
|
||||
('show_brush', 'show_legend'),
|
||||
('rich_tooltip', 'y_axis_zero'),
|
||||
('y_log_scale', 'contribution')
|
||||
|
|
|
|||
Loading…
Reference in New Issue