Skip to content

Commit

Permalink
Fix y-axis label for nvd3, fix duration
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Feb 11, 2018
1 parent fa3d12a commit 719383f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/plugins/visualizations/nvd3_bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"babel-preset-env": "^1.6.1",
"backbone": "^1.3.3",
"bootstrap": "^3.3.7",
"d3": "3.4.5",
"d3": "^3.4.5",
"jquery": "^3.1.1",
"nvd3": "^1.8.6",
"parcel-bundler": "^1.4.1"
Expand Down
3 changes: 2 additions & 1 deletion config/plugins/visualizations/nvd3_bar/src/nvd3.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var CommonWrapper = Backbone.View.extend({
nv.addGraph(function() {
try {
d3chart.xAxis.axisLabel(chart.settings.get("x_axis_label"));
d3chart.yAxis.axisLabel(chart.settings.get("y_axis_label")).axisLabelDistance(30);
d3chart.yAxis.axisLabel(chart.settings.get("y_axis_label"));
d3chart.options({ showControls: false });
if (d3chart.showLegend) {
d3chart.showLegend(chart.settings.get("show_legend") == "true");
Expand All @@ -40,6 +40,7 @@ var CommonWrapper = Backbone.View.extend({
d3chart.tooltip.contentGenerator(function(context) {
return "<h3>" + (context.data.tooltip || context.data.key) + "</h3>";
});
d3chart.duration(0);
if ($("#" + canvas_id).length > 0) {
var canvas = d3.select("#" + canvas_id);
canvas.datum(groups).call(d3chart);
Expand Down
6 changes: 3 additions & 3 deletions config/plugins/visualizations/nvd3_bar/static/nvd3.js

Large diffs are not rendered by default.

0 comments on commit 719383f

Please sign in to comment.