I have below Dygraph using the dygraphs package
library(dygraphs)
library(htmlwidgets)
library(zoo)
valueFormatter = "function formatValue(v) {
                                            var suffixes = ['', 'K', 'M', 'G', 'T'];
                                            if (v < 1000) return v;
                                            var magnitude = Math.ceil(String(Math.floor(v)).length / 4-1);
                                            if (magnitude > suffixes.length - 1)
                                            magnitude = suffixes.length - 1;
                                            return String(Math.round(v / Math.pow(10, magnitude * 3), 2)) +suffixes[magnitude]
                                        }" 
Data = zoo(matrix(c(10000, 1000000, 100000000, 50000), nc = 1), as.Date(c('2015-01-05', '2016-01-05', '2017-01-05', '2018-01-05'))); colnames(Data) = 'x'
dygraph(Data, main = "") %>% dySeries(c("x")) %>% 
                            dyAxis("y", axisLabelFormatter = JS(valueFormatter), 
                                        valueFormatter     = JS(valueFormatter),
                                        rangePad = 20)
However in the label of Y-axis I want to bring Thousand seperator for the tick values e.g. instead of 30000K I want to have 3,0000K. Is there any way to achieve this.
                        
Convert your number
30000Kinto thousand separated value30,000K.Regex to place comma after each 3rd digit
Updated
valueFormatterfunction