zhaoyan.li преди 2 години
родител
ревизия
b59d080941
променени са 1 файла, в които са добавени 3 реда и са изтрити 5 реда
  1. 3 5
      charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AATooltip.kt

+ 3 - 5
charts/src/main/java/com/github/aachartmodel/aainfographics/aaoptionsmodel/AATooltip.kt

@@ -102,9 +102,7 @@ class AATooltip {
     }
 
     fun formatter(prop: String): AATooltip {
-        var pureJSFunctionStr = "($prop)"
-        pureJSFunctionStr = AAJSStringPurer.pureJavaScriptFunctionString(pureJSFunctionStr)
-        formatter = pureJSFunctionStr
+        formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
         return this
     }
 
@@ -154,12 +152,12 @@ class AATooltip {
     }
 
     fun pointFormatter(prop: String): AATooltip {
-        pointFormatter = prop
+        pointFormatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
         return this
     }
 
     fun positioner(prop: String): AATooltip {
-        positioner = prop
+        positioner = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
         return this
     }