Ok. After so many trial and errors, I managed to do this. Here is how iI did (providing here to help future readers).
I added a column called value in my dataset
data1 <- data1 %>% mutate(value = ifelse(Changelabel == ">20% Decrease",1,
ifelse(Changelabel == "<20% Decrease",2,
ifelse(Changelabel == "<20% Increase",3,
ifelse(Changelabel == ">20% Increase",4, 5)))))
And then I created a data class for color axis,:
dclass <- data_frame(from = seq(1, 4, by = 1),
name = c(">20% Decrease","<20% Decrease","<20% Increase",">20% Increase"),
color = c("#00B0F0","#B7DEE8","#92D050","#00B050"))
dclass <- list_parse(dclass)
Then in my chart making code, I added this line,:
hc_colorAxis(dataClasses = dclass)
Now it workedworks with proper legend as iI expected.