diff --git a/examples/demo_all.py b/examples/demo_all.py index 4871a4df..856b69b5 100644 --- a/examples/demo_all.py +++ b/examples/demo_all.py @@ -35,10 +35,10 @@ - - - - + + + + """ @@ -46,7 +46,7 @@ output_file.write(html_open) type = "discreteBarChart" -chart = discreteBarChart(name='my graphname', height=400, jquery_on_ready=True) +chart = discreteBarChart(name='my graphname', height=400, width=800, jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") xdata = ["A", "B", "C", "D", "E", "F", "G"] ydata = [3, 12, -10, 5, 25, -7, 2] @@ -75,7 +75,7 @@ name = "lineChart-different-x-axis" type = "lineChart" -chart = lineChart(name=name, height=350, x_is_date=False, +chart = lineChart(name=name, height=400, width=800, x_is_date=False, jquery_on_ready=True) chart.set_containerheader("\n\n

" + name + "

\n\n") @@ -99,7 +99,7 @@ # --------------------------------------- type = "lineChart" -chart = lineChart(height=350, x_is_date=True, x_axis_format="%d %b %Y %H", +chart = lineChart(height=400, width=800, x_is_date=True, x_axis_format="%d %b %Y %H", jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") @@ -125,7 +125,7 @@ type = "lineChartWithInteractiveGuideline" chart = lineChart(name="lineChart-With-Interactive-Guideline", - height=350, x_is_date=True, x_axis_format="%d %b %Y %H", + height=400, width=800, x_is_date=True, x_axis_format="%d %b %Y %H", jquery_on_ready=True, use_interactive_guideline=True) chart.set_containerheader("\n\n

" + type + "

\n\n") @@ -151,6 +151,7 @@ type = "lineWithFocusChart" chart = lineWithFocusChart(color_category='category20b', x_is_date=True, + height=400, width=800, x_axis_format="%d %b %Y", jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") @@ -164,7 +165,7 @@ extra_serie = {"tooltip": {"y_start": "There is ", "y_end": " calls"}, "date_format": "%d %b %Y %I:%M:%S"} -#extra_serie = None +# extra_serie = None chart.add_serie(name="serie 1", y=ydata, x=xdata, extra=extra_serie) chart.add_serie(name="serie 2", y=ydata2, x=xdata, extra=extra_serie) chart.add_serie(name="serie 3", y=ydata3, x=xdata, extra=extra_serie) @@ -177,7 +178,7 @@ # --------------------------------------- type = "stackedAreaChart" -chart = stackedAreaChart(height=350, x_is_date=True, +chart = stackedAreaChart(height=400, width=800, x_is_date=True, x_axis_format="%d %b %Y %I", jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") @@ -197,7 +198,7 @@ # --------------------------------------- type = "linePlusBarChart" -chart = linePlusBarChart(height=350, x_is_date=True, +chart = linePlusBarChart(height=400, width=800, x_is_date=True, x_axis_format="%d %b %Y", jquery_on_ready=True, focus_enable=True) chart.set_containerheader("\n\n

" + type + "

\n\n") @@ -219,7 +220,8 @@ # --------------------------------------- type = "cumulativeLineChart" -chart = cumulativeLineChart(height=350, x_is_date=True, +chart = cumulativeLineChart(height=400, width=800, + x_is_date=True, x_axis_format="%d %b %Y", jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") @@ -239,7 +241,7 @@ # --------------------------------------- type = "multiBarHorizontalChart" -chart = multiBarHorizontalChart(height=350, jquery_on_ready=True) +chart = multiBarHorizontalChart(height=400, width=800, jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") nb_element = 10 @@ -257,7 +259,7 @@ # --------------------------------------- type = "multiBarChart" -chart = multiBarChart(height=350, jquery_on_ready=True) +chart = multiBarChart(height=400, width=800, jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") nb_element = 10 xdata = list(range(nb_element)) @@ -274,7 +276,7 @@ # --------------------------------------- type = "multiBarChartDate" -chart = multiBarChart(name=type, height=350, x_is_date=True, jquery_on_ready=True) +chart = multiBarChart(name=type, height=400, width=800, x_is_date=True, jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") nb_element = 100 start_time = int(time.mktime(datetime.datetime(2012, 6, 1).timetuple()) * 1000) @@ -296,7 +298,7 @@ # --------------------------------------- type = "scatterChart" -chart = scatterChart(height=350, date=False, jquery_on_ready=True) +chart = scatterChart(height=400, width=800, date=False, jquery_on_ready=True) chart.set_containerheader("\n\n

" + type + "

\n\n") nb_element = 50 xdata = [i + random.randint(1, 10) for i in range(nb_element)] diff --git a/examples/ipythonDemo.ipynb b/examples/ipythonDemo.ipynb index 02f2bd5e..77a0f5b1 100644 --- a/examples/ipythonDemo.ipynb +++ b/examples/ipythonDemo.ipynb @@ -316,7 +316,7 @@ " tooltip_str = '
'+key+'
' + y + ' at ' + x;\n", " return tooltip_str;\n", " });\n", - "chart.scatter.onlyCircles(false); chart.showLegend(true);\n", + "chart.showLegend(true);\n", " d3.select('#scatterChart_1 svg')\n", " .datum(data_scatterChart_1)\n", " .transition().duration(500)\n", diff --git a/examples/scatterChart.py b/examples/scatterChart.py index 780c37b3..51338907 100644 --- a/examples/scatterChart.py +++ b/examples/scatterChart.py @@ -16,7 +16,7 @@ output_file = open('test_scatterChart.html', 'w') type = "scatterChart" -chart = scatterChart(name=type, height=350, x_is_date=False) +chart = scatterChart(name=type, height=350, width=800, x_is_date=False) chart.set_containerheader("\n\n

" + type + "

\n\n") nb_element = 50 xdata = [i + random.randint(1, 10) for i in range(nb_element)] diff --git a/nvd3/scatterChart.py b/nvd3/scatterChart.py index 9b784bab..0040897c 100644 --- a/nvd3/scatterChart.py +++ b/nvd3/scatterChart.py @@ -86,9 +86,7 @@ class scatterChart(TemplateMixin, NVD3Chart): return tooltip_str; }); - chart.scatter.onlyCircles(false); - - chart.showLegend(true); + chart.showLegend(true); chart .showDistX(true) diff --git a/nvd3/templates/scatterchart.html b/nvd3/templates/scatterchart.html index 080d006e..8c2adaae 100644 --- a/nvd3/templates/scatterchart.html +++ b/nvd3/templates/scatterchart.html @@ -37,8 +37,6 @@ {% block inject %} - chart.scatter.onlyCircles(false); - chart .showDistX(true) .showDistY(true)