Browse Source

Resolve uncaught exception: Highcharts error #17

An An 5 years ago
parent
commit
75086d2673

+ 0 - 10
app/src/main/assets/AAChartView.js

@@ -100,21 +100,16 @@
             var container = document.getElementById('container');//获得元素
             container.style.width = receivedWidth;//设置宽度
             aaGlobalChart.reflow();
-            console.log("🌞修改了内容的宽度" + receivedWidth);
         }
 
         function setTheChartViewContentHeight (receivedHeight) {
              var container = document.getElementById('container');//获得元素
              container.style.height = receivedHeight;//设置高度
              aaGlobalChart.reflow();
-             console.log("🌛修改了内容的高度" + receivedHeight);
 
         }
 
         function setChartSeriesHidden(hidden) {
-                     console.log("🔥element是显示还是隐藏" + receivedHeight);
-
-
              for (var i = 0; i < aaGlobalChart.series.length; i++) {
                   var series = aaGlobalChart.series[i];
                      if (hidden == true) {
@@ -123,11 +118,6 @@
                          series.show();
                        }
                    }
-                                        console.log("🚀element是显示还是隐藏" + receivedHeight);
-                                                        alert("隐藏还是显示"+ hidden);
-
-	var err = undefined;
-	err.a = 1;
         }
 
         function showTheSeriesElementContentWithIndex (elementIndex) {

+ 1 - 1
app/src/main/java/com/aachartmodel/aainfographics/AAInfographicsLib/AAChartConfiger/AAChartModel.kt

@@ -452,7 +452,7 @@ class AAChartModel {
         return this
     }
 
-    fun AAChartModel() {
+     init {
         chartType = AAChartType.Line.value
         animationDuration = 500//以毫秒为单位
         animationType = AAChartAnimationType.Linear.value

+ 1 - 1
app/src/main/java/com/aachartmodel/aainfographics/AAInfographicsLib/AAChartConfiger/AASeriesElement.kt

@@ -56,7 +56,7 @@ class AASeriesElement {
 
 
     fun type(prop: AAChartType): AASeriesElement {
-        type = prop.toString()
+        type = prop.value
         return this
     }
 

+ 2 - 2
app/src/main/java/com/aachartmodel/aainfographics/ChartsDemo/BasicContent/MixedChartActivity.kt

@@ -53,7 +53,7 @@ class MixedChartActivity : AppCompatActivity() {
     }
 
 
-    private fun configureTheAAChartModel(chartType: String): AAChartModel? {
+    private fun configureTheAAChartModel(chartType: String): AAChartModel {
         when (chartType) {
             "arearangeMixedLine" -> return MixedChartComposer.arearangeMixedLine()
             "columnrangeMixedLine" -> return MixedChartComposer.configureColumnrangeMixedLineChart()
@@ -65,6 +65,6 @@ class MixedChartActivity : AppCompatActivity() {
             "polygonMixedScatter" -> return MixedChartComposer.polygonMixedScatter()
             "polarChartMixed" -> return MixedChartComposer.polarChartMixedChart()
         }
-        return null
+        return MixedChartComposer.arearangeMixedLine()
     }
 }