Skip to content

Commit

Permalink
add margin support to horizontal multibar
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-jones committed Sep 20, 2014
1 parent ab8f849 commit 855290f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jquery.reportview.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,19 @@ function renderHorizontalMultiBar(params) {
var y_tick_format = options.horizontal_multibar_y_tick_format
var transition_duration = options.horizontal_multibar_transition_duration

var margin_top = options.horizontal_multibar_margin_top
var margin_right = options.horizontal_multibar_margin_right
var margin_bottom = options.horizontal_multibar_margin_bottom
var margin_left = options.horizontal_multibar_margin_left

// set the space up for the new chart
//$(selector).empty()

nv.addGraph(function() {
var chart = nv.models.multiBarHorizontalChart()
.x(function(d) { return d.label })
.y(function(d) { return d.value })
.margin({top: margin_top, right: margin_right, bottom: margin_bottom, left: margin_left})
.showValues(show_values)
.tooltips(tool_tips)
.showControls(controls);
Expand Down Expand Up @@ -287,6 +293,10 @@ function renderHorizontalMultiBar(params) {
"horizontal_multibar_controls" : false,
"horizontal_multibar_y_tick_format" : ',.0f',
"horizontal_multibar_transition_duration" : 500,
"horizontal_multibar_margin_top" : 30,
"horizontal_multibar_margin_right": 50,
"horizontal_multibar_margin_bottom": 30,
"horizontal_multibar_margin_left": 200,

// data from which to build the graph
"data_series" : false,
Expand Down

0 comments on commit 855290f

Please sign in to comment.