Use ggplot2 to map the variables to the aesthetics just as you described. You don't want type on the y-axis - you want type on another axis, in this case fill for stacks of different colors. The default y aesthetic for a bar plot is count.
library(ggplot2)
mydata <- read.csv(
  text = "s no,type,state
  t1,type1,A
  t2,type2,C
  t3,type3,A
  t4,type1,B
  t5,type3,B
  t6,type3,B
  t7,type3,C
  t8,type2,A
  t9,type2,C
  t10,type2,B")
ggplot(mydata, aes(x = state, fill = type)) + 
  geom_bar()