From 14fd3c94b579fff531bd634c577001ccb0540d85 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Fri, 7 Oct 2016 13:49:00 -0400 Subject: [PATCH] fix plotly horizontal bars --- src/backends/plotly.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index be88f4a9..627adeb7 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -30,6 +30,7 @@ const _plotly_attr = merge_with_base_supported([ :aspect_ratio, :hover, :inset_subplots, + :bar_width, ]) const _plotly_seriestype = [ @@ -423,8 +424,11 @@ function plotly_series(plt::Plot, series::Series) elseif st == :bar d_out[:type] = "bar" - d_out[:x], d_out[:y] = x, y - d_out[:orientation] = isvertical(series) ? "v" : "h" + d_out[:x], d_out[:y], d_out[:orientation] = if isvertical(series) + x, y, "v" + else + y, x, "h" + end d_out[:marker] = KW(:color => rgba_string(series[:fillcolor])) elseif st == :heatmap