Plotly不显示行

时间:2018-04-21 06:25:04

标签: r ggplot2 shiny plotly

This is my line chart but it doesn't display lines

ui.R

  selectizeInput("ope4",label = "operation is :",choices = unique(dd1$operationtype),multiple = T, options = list(maxItems = 3, placeholder = 'Select operation'),selected = "Take Away")

server.R

 if (length(input$ope4) == 0) {
      print("Please select at least one operation")
    } else {
      ope_data <- data4()[data4()$operationtype == input$ope4, ]
      ggplot(ope_data) +
        geom_line(aes(x = Dates, y = tamount, by = operationtype, color = operationtype )) +
        labs(x = "Date", y = "Amount", title = "operation vie sales") +
        scale_colour_hue("clarity", l = 70, c = 150) +  theme(axis.text.x = element_text(angle=35, vjust=0.5)) 
    }

1 个答案:

答案 0 :(得分:0)

尝试在美学中添加'group = 1'。