From 89b5582d0de6756daaafd42859d9dad11265a051 Mon Sep 17 00:00:00 2001 From: Will Kearney Date: Sun, 17 Dec 2017 16:13:35 -0500 Subject: [PATCH] Map rgba_string over :color vector and cycle through result --- src/backends/plotly.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 70bb7ea9..f7d24acd 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -542,7 +542,7 @@ function plotly_series(plt::Plot, series::Series) y, x, "h" end d_out[:width] = series[:bar_width] - d_out[:marker] = KW(:color => rgba_string(series[:fillcolor]), + d_out[:marker] = KW(:color => _cycle(rgba_string.(series[:fillcolor]),eachindex(series[:x])), :line => KW(:width => series[:linewidth])) elseif st == :heatmap @@ -610,14 +610,14 @@ function plotly_series(plt::Plot, series::Series) :size => 2 * series[:markersize], # :color => rgba_string(series[:markercolor]), :line => KW( - :color => rgba_string(series[:markerstrokecolor]), + :color => _cycle(rgba_string.(series[:markerstrokecolor]),eachindex(series[:x])), :width => series[:markerstrokewidth], ), ) # gotta hack this (for now?) since plotly can't handle rgba values inside the gradient if series[:marker_z] == nothing - d_out[:marker][:color] = rgba_string(series[:markercolor]) + d_out[:marker][:color] = _cycle(rgba_string.(series[:markercolor]),eachindex(series[:x])) else # grad = ColorGradient(series[:markercolor], alpha=series[:markeralpha]) # grad = as_gradient(series[:markercolor], series[:markeralpha])