plotly polar support, api changed in plotly.js v2.x.x

https://plotly.com/javascript/polar-chart/
https://community.plotly.com/t/announcing-plotly-js-2-0/53675
This commit is contained in:
Jks Liu 2021-11-27 12:31:58 +08:00
parent 1aaecbcac2
commit 04f2763045

View File

@ -1013,8 +1013,9 @@ function plotly_polar!(plotattributes_out::KW, series::Series)
# convert polar plots x/y to theta/radius # convert polar plots x/y to theta/radius
if ispolar(series[:subplot]) if ispolar(series[:subplot])
theta, r = pop!(plotattributes_out, :x), pop!(plotattributes_out, :y) theta, r = pop!(plotattributes_out, :x), pop!(plotattributes_out, :y)
plotattributes_out[:t] = rad2deg.(theta) plotattributes_out[:theta] = rad2deg.(theta)
plotattributes_out[:r] = r plotattributes_out[:r] = r
plotattributes_out[:type] = :scatterpolar
end end
end end