An An

Results 545 comments of An An

同样的代码, 在其他版本的系统上也有这个问题吗?

看你的截图, 似乎不用设置成透明颜色, 直接设置 `AAChartModel` 对象的**背景色**和整个大屏同色, 应该也行吧? ```java public class AAChartModel { ... public Object backgroundColor; //图表背景色 ... public AAChart backgroundColor(Object prop) { backgroundColor = prop; return this; } ... }...

> 这个backgroundColor好像不支持透明色,我设成“#00000000”最终显示出来是白色底的 `AAChartView` 是继承自 `WebView` 的, 这个 `backgroundColor` 设置是的绘制图表的 `` 标签的背景色的.

```java public void setIsClearBackgroundColor(Boolean isClearBackgroundColor) { this.isClearBackgroundColor = isClearBackgroundColor; if (this.isClearBackgroundColor) { this.setBackgroundColor(0); this.getBackground().setAlpha(0); } else { this.setBackgroundColor(1); this.getBackground().setAlpha(255); } } ``` 从上面的代码可以看出, `setClearBackgroundColor` 才是用来设置 `WebView` 自身为透明色的. 所以 `AAChartView` 的内部实现里有这段代码...

> > 同样的代码, 在其他版本的系统上也有这个问题吗? > > 不会,在模拟器,手机,电视上都安装过,都正常。唯独这个机顶盒里安装不行 所以这个估计是这个 Android 版本系统自身的 bug, 参考: * https://stackoverflow.com/questions/5003156/android-webview-style-background-colortransparent-ignored-on-android-2-2 这里的解决方案, 在 `android 4.4.2` 上为 `AAChartView` 额外补充这段代码: ```java aaChartView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); ``` 这是为了关闭 `WebView` 的硬件加速功能,因为在某些情况下硬件加速会导致背景不透明. ⚠️注意:关闭硬件加速可能会影响性能,因此仅在必须时才禁用它(你这里应该只要确保系统版本为`android 4.4.2`时,...

Sorry, AAChartCore-Kotlin do NOT support it!

Maybe you need to use Highcharts official Android wraper to get this functionality. **Highcharts official Android wrapper** * https://github.com/highcharts/highcharts-android **Custom fonts for highcharts-android** * https://github.com/highcharts/highcharts-android#custom-fonts

[AAChartCore-Kotlin](https://github.com/AAChartModel/AAChartCore-Kotlin) do not support it.

不支持此功能