     }
     
     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)
        }
        
        let js = "loadEcharts('\(optionJson.stringByReplacingOccurrencesOfString("\\n", withString: "<br>"))')"
        printInfo(js)
        callJsMethod(js.stringByReplacingOccurrencesOfString("\n", withString: "\\n"))
    }
    
    public func loadEcharts(with option: Option) {

    ///   - specialAreas: 可选。将地图中的部分区域缩放到合适的位置，可以使得整个地图的显示更加好看
    public func registerMap(name: String, data: NSDictionary, specialAreas: [String: Jsonable] = [:]) {
        let dataJson = data.jsonString
        self.callJsMethod("registerMap(\("'\(name)', '\(preDealWithParams(dataJson))', '\(specialAreas.jsonString)'"))")
    }
    
    /// 重置图表
