     }
     
     private func callJsMethod(jsString: String) {
+//        print(jsString)
         self.evaluateJavaScript(jsString, completionHandler: nil)
+    }
+    
+    private func preDealWithParams(paramsJson: String) -> String {
+        // Pre-deal with the special character when pass parameter to js
+        var js = paramsJson.stringByReplacingOccurrencesOfString("\\n", withString: "<br>")
+        js = js.stringByReplacingOccurrencesOfString("\n", withString: "\\n")
+        js = js.stringByReplacingOccurrencesOfString("'", withString: "\\'")
+        return js
     }
     
     private func resizeDiv() {

            //            self.callJsMethod("function \(name)(params){ alert(\(name));eval('window.webkit.messageHandlers.\(name).postMessage(' + params + ')'); }")
        }
        
        let js = "refreshEcharts('\(optionJson.stringByReplacingOccurrencesOfString("\\n", withString: "<br>"))', \(notMerge), \(lazyUpdate), \(silent))"
//        print(js)
        self.callJsMethod(js.stringByReplacingOccurrencesOfString("\n", withString: "\\n"))
    }
    
    // MARK: - Private Functions

            self.callJsMethod(function)
        }
        
        callJsMethod("loadEcharts('\(preDealWithParams("\(optionJson)"))')")
    }
    
    public func loadEcharts(with option: Option) {
