This example from plotly documentation given an error -
"Error: Trace type must be one of the following:
‘scatter’, ‘box’, ‘bar’, ‘heatmap’, ‘histogram’, ‘histogram2d’, ‘histogram2dcontour’, ‘pie’, ‘contour’, ‘scatterternary’, ‘sankey’, ‘scatter3d’, ‘surface’, ‘mesh3d’, ‘scattergeo’, ‘choropleth’, ‘scattergl’, ‘pointcloud’, ‘heatmapgl’, ‘parcoords’, ‘scattermapbox’, ‘carpet’, ‘scattercarpet’, ‘contourcarpet’, ‘ohlc’, ‘candlestick’, ‘area’
library(plotly)
df <- read.csv(“https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv”)
p <- df %>%
plot_ly(
y = ~total_bill,
type = ‘violin’,
box = list(
visible = T
),
meanline = list(
visible = T
),
x0 = ‘Total Bill’
) %>%
layout(
yaxis = list(
title = “”,
zeroline = F
)
)
Any help to troubleshoot will be greatly appreciated.
Thanks,
Praveen.