的
This commit is contained in:
@@ -0,0 +1,179 @@
|
||||
|
||||
# Created by https://www.gitignore.io/api/java,android,osx,intellij,gradle
|
||||
|
||||
### Android ###
|
||||
# Built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
|
||||
# Files for the ART/Dalvik VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# Generated files
|
||||
bin/
|
||||
gen/
|
||||
out/
|
||||
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Proguard folder generated by Eclipse
|
||||
proguard/
|
||||
|
||||
# Log Files
|
||||
*.log
|
||||
|
||||
# Android Studio Navigation editor temp files
|
||||
.navigation/
|
||||
|
||||
# Android Studio captures folder
|
||||
captures/
|
||||
|
||||
# Intellij
|
||||
*.iml
|
||||
.idea/
|
||||
|
||||
# Keystore files
|
||||
#*.jks
|
||||
|
||||
# External native build folder generated in Android Studio 2.2 and later
|
||||
.externalNativeBuild
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
#google-services.json
|
||||
|
||||
# Freeline
|
||||
freeline.py
|
||||
freeline/
|
||||
freeline_project_description.json
|
||||
|
||||
### Android Patch ###
|
||||
gen-external-apklibs
|
||||
|
||||
### Intellij ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.xml
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
### Intellij Patch ###
|
||||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||
|
||||
# *.iml
|
||||
# modules.xml
|
||||
# .idea/misc.xml
|
||||
# *.ipr
|
||||
|
||||
### Java ###
|
||||
# Compiled class file
|
||||
|
||||
# Log file
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
### OSX ###
|
||||
*.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
/build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
# End of https://www.gitignore.io/api/java,android,osx,intellij,gradle
|
||||
/app/build/
|
||||
@@ -0,0 +1,530 @@
|
||||

|
||||
|
||||
|
||||
# AAInfographics
|
||||
|
||||
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin) </br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/LICENSE)</br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin) </br>
|
||||
[](https://github.com/AAChartModel/AAChartCore)</br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/CHINESE-README.md#当前已支持的图表渲染动画类型有三十种以上说明如下)</br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/CHINESE-README.md)</br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin)</br>
|
||||
[](http://isitmaintained.com/project/AAChartModel/AAChartCore-Kotlin "Average time to resolve an issue")</br>
|
||||
[](http://isitmaintained.com/project/AAChartModel/AAChartCore-Kotlin "Percentage of issues still open")
|
||||
|
||||
|
||||
## [ **English Document 🇬🇧** ](https://github.com/AAChartModel/AAChartCore-Kotlin) | [ **简体中文文档 🇨🇳** ](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/CHINESE-README.md)
|
||||
|
||||
### 您所喜爱的`AAInfographics`开源图表框架同时更有`Java`版本可供使用,详情请点击以下链接
|
||||
### 传送门
|
||||
#### *https://github.com/AAChartModel/AAChartCore*
|
||||
|
||||
## 前言
|
||||
|
||||
***AAInfographics***,是 [AAChartKit](https://github.com/AAChartModel/AAChartKit) 的 `Kotlin`语言版本,是在流行的开源前端图表框架 [Highcharts](https://www.hcharts.cn) 的基础上,封装的面向对象的,一组简单易用,极其精美的图表绘制组件.可能是这个星球上 UI 最精致的第三方 Android 开源图表框架了(✟我以无神论者的名义向上帝起誓🖐,我真的没有在说鬼话✟)
|
||||
|
||||
***
|
||||
## 功能特性
|
||||
|
||||
1. **环境友好,兼容性强**. 支持 `Kotlin`语言,配置简单.同时更有苹果公司的 iOS 端 Objective-C 版本 [AAChartKit](https://github.com/AAChartModel/AAChartKit)、Swift 版本 [AAChartKit-Swift](https://github.com/AAChartModel/AAChartKit-Swift)、谷歌公司的 Android 端 Java 版本 [AAChartCore](https://github.com/AAChartModel/AAChartCore)、等其他各种移动平台主流语言版本可供使用.
|
||||
1. **功能强大,类型多样**. 支持`柱状图` 、`条形图` 、`折线图` 、`曲线图` 、`折线填充图` 、`曲线填充图`、`雷达图`、`极地图`、`扇形图`、`气泡图`、`散点图`、`区域范围图`、`柱形范围图`、`面积范围图`、`面积范围均线图`、`直方折线图`、`直方折线填充图`、`箱线图`、`瀑布图`、`热力图`、`桑基图`、`金字塔图`、`漏斗图`、等二十几种类型的图形,不可谓之不多.
|
||||
1. **交互式图形动画**. 有着清晰和充满细节的用户交互方式,与此同时,图形渲染`动画`效果细腻精致,流畅优美.有三十多种以上渲染动画效果可供选择,用户可自由设置渲染图形时的动画时间和动画类型,关于图形渲染动画类型,具体参见[ AAInfographics 动画类型](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/CHINESE-README.md#当前已支持的图表渲染动画类型有三十种以上说明如下).
|
||||
1. **支持手势缩放**.支持图表的手势缩放和拖动阅览,手势缩放类型具体参见[ AAInfographics 手势缩放类型](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/CHINESE-README.md#当前已支持的图表手势缩放类型共有三种说明如下),默认禁用手势缩放功能.
|
||||
1. **极简主义**. `AAChartView + AAChartModel = Chart`,在 ***AAInfographics*** 数据可视化图形框架当中,遵循这样一个极简主义公式:`图表视图控件 + 图表模型 = 你想要的图表`.同其他几款强大、精美而又易用的开源图形框架 [AAChartKit](https://github.com/AAChartModel/AAChartKit)、[AAChartKit-Swift](https://github.com/AAChartModel/AAChartKit-Swift)、[AAChartCore](https://github.com/AAChartModel/AAChartCore) 完全一致.
|
||||
1. **链式编程语法**. 支持系统类推荐的 `链式编程语法`,一行代码即可配置完成 `AAChartModel`模型对象实例.
|
||||
1. **简洁清晰,轻便易用**. 最少仅仅需要 **五行代码** 即可完成整个图表的绘制工作(使用链式编程语法配置 `AAChartModel` 实例对象时,无论你写多少行代码,理论上只能算作是一行). 😜😜😜
|
||||
|
||||
***
|
||||
|
||||
## 真机美图
|
||||
|
||||
<div>
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/ColumnChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/BarChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/AreaChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/LineChart.png' width="24%" >
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/StepAreaChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/StepLineChart.png' width="24%" >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/splineChart.png' width="24%" >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/areasplineChart.png' width="24%" >
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/percentStackingAreasplineChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/Gallery/blob/master/AAInfographics/BubbleChart.png' width="24%">
|
||||
<img src='https://github.com/AAChartModel/Gallery/blob/master/AAInfographics/ArearangeAverageValueChart.png' width="24%">
|
||||
<img src='https://github.com/AAChartModel/Gallery/blob/master/AAInfographics/ColumnMixedLineChart.png' width="24%">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/scatterChart.png' width="24%" >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/boxplotChart.png' width="24%">
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/MirrorColumnChart.png' width="24%">
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/stackingColumnChart.png' width="24%">
|
||||
</div>
|
||||
|
||||
## 安装
|
||||
|
||||
### 通过 Gradle 安装
|
||||
|
||||
#### Step 1. 添加 `JitPack 仓库支持` 到你的 `build` 文件中
|
||||
|
||||
在**项目根目录**的 `build.gradle(注意:不是 app/build.gradle)` 中添加对 `JitPack` 的支持:
|
||||
|
||||
```groovy
|
||||
allprojects {
|
||||
repositories {
|
||||
...
|
||||
maven { url 'https://www.jitpack.io' }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Step 2. 添加 `AAChartCore-Kotlin(AAInfographics)` 依赖
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation 'com.github.AAChartModel:AAChartCore-Kotlin:-SNAPSHOT'
|
||||
}
|
||||
```
|
||||
|
||||
## 使用方法
|
||||
|
||||
1. 创建视图*AAChartView*
|
||||
|
||||
```xml
|
||||
<com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
android:id="@+id/aa_chart_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</com.github.aachartmodel.aainfographics.aachartcreator.AAChartView>
|
||||
```
|
||||
|
||||
```kotlin
|
||||
val aaChartView = findViewById<AAChartView>(R.id.aa_chart_view)
|
||||
```
|
||||
2. 配置视图模型*AAChartModel*
|
||||
|
||||
* 链式编程的方式配置 *AAChartModel* 模型对象属性
|
||||
```kotlin
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Area)
|
||||
.title("title")
|
||||
.subtitle("subtitle")
|
||||
.backgroundColor("#4b2b7f")
|
||||
.dataLabelEnabled(true)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.data(arrayOf(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6)),
|
||||
AASeriesElement()
|
||||
.name("NewYork")
|
||||
.data(arrayOf(0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5)),
|
||||
AASeriesElement()
|
||||
.name("London")
|
||||
.data(arrayOf(0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0)),
|
||||
AASeriesElement()
|
||||
.name("Berlin")
|
||||
.data(arrayOf(3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8))
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
3. 绘制图形(创建 AAChartView 实例对象后,首次绘制图形调用此方法)
|
||||
|
||||
```kotlin
|
||||
/*图表视图对象调用图表模型对象,绘制最终图形*/
|
||||
aaChartView.aa_drawChartWithChartModel(aaChartModel)
|
||||
```
|
||||
|
||||
🌹🌹🌹 好了,至此,有关于绘制图形的任务,一切皆已经搞定!!! 你将得到你想要的任意图形!!!
|
||||
|
||||
### 更新图形内容
|
||||
如果你需要更新图表内容,你应该阅读以下内容,根据你的实际需要,选择调用适合你的函数
|
||||
|
||||
* 仅仅刷新图形的`series`数据内容(首次绘制图形完成之后,后续刷新图表数据均建议调用此方法)
|
||||
|
||||
```kotlin
|
||||
/*仅仅更新了图表的series数组数据,不改动图表的其他内容*/
|
||||
aaChartView.aa_onlyRefreshTheChartDataWithChartModelSeries(chartModelSeriesArray)
|
||||
```
|
||||
|
||||
* 刷新图形除数据属性 `series` 以外的其他属性(首次绘制图形完成之后,后续刷新图表的属性均建议调用此方法 注意:仅仅刷新图形数据,则建议使用上面的👆`aa_onlyRefreshTheChartDataWithChartModelSeries`方法)
|
||||
|
||||
```kotlin
|
||||
/*更新 AAChartModel 整体内容(如修改了图表的类型,将 column chart 改为 area chart)之后,刷新图表*/
|
||||
aaChartView.aa_refreshChartWholeContentWithChartModel(aaChartModel)
|
||||
```
|
||||
|
||||
|
||||
## **AAInfographics**一些重要属性经过配置之后的图形示例如下
|
||||
|
||||
- ### line chart - 折线图
|
||||
|
||||

|
||||
|
||||
- ### column chart - 柱形图
|
||||
|
||||

|
||||
|
||||
- ### bar chart - 条形图
|
||||
|
||||

|
||||
|
||||
- ### special area chart one - 常规折线区域填充图
|
||||
|
||||

|
||||
|
||||
- ### special area chart two - 带有负数的区域填充图
|
||||
|
||||
)
|
||||
|
||||
- ### special area chart three - 堆积效果的区域填充图
|
||||
|
||||

|
||||
|
||||
- ### polar chart - 极地图
|
||||
|
||||

|
||||
|
||||
- ### radar chart - 雷达图
|
||||
|
||||

|
||||
|
||||
- ### pie chart - 扇形图
|
||||
|
||||

|
||||
|
||||
- ### bubble chart - 气泡图
|
||||
|
||||

|
||||
|
||||
- ### scatter chart - 散点图
|
||||
|
||||

|
||||
|
||||
- ### arearange chart - 区域范围图
|
||||
|
||||

|
||||
|
||||
- ### step area chart - 直方折线填充图
|
||||
|
||||

|
||||
|
||||
- ### mixed chart - 混合图形
|
||||
|
||||

|
||||
|
||||
|
||||
### 更多图形效果
|
||||
注意:如下的这幅`DEMO演示图`为大小*6M*左右的`GIF动态图`,如未显示动态效果则说明图片资源未全部加载。请耐心等待至图片资源内容完全加载结束后,即可最终观赏更多的项目的动态演示效果.
|
||||
|
||||

|
||||
|
||||
|
||||
## 特别说明
|
||||
|
||||
### 支持监听用户点击事件及单指滑动事件
|
||||
|
||||
可通过给 AAChartView 实例对象设置代理方法,来实现监听用户的点击事件和单指滑动事件
|
||||
```kotlin
|
||||
interface AAChartViewCallBack {
|
||||
fun chartViewMoveOverEventMessage(aaChartView: AAChartView, messageModel: AAMoveOverEventMessageModel)
|
||||
}
|
||||
```
|
||||
|
||||
在监听用户交互事件时,获取的事件信息`AAMoveOverEventMessageModel`共包含以下内容
|
||||
|
||||
```kotlin
|
||||
class AAMoveOverEventMessageModel {
|
||||
var name: String? = null
|
||||
var x: Double? = null
|
||||
var y: Double? = null
|
||||
var category: String? = null
|
||||
var offset: LinkedTreeMap<*, *>? = null
|
||||
var index: Double? = null
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 支持通过`JavaScript` 函数来自定义 `AATooltip`视图显示效果
|
||||
|
||||
有时系统默认的 tooltip 浮动提示框的显示效果无法满足使用者的特殊自定义要求,此时可以通过添加 AATooltip 的 `headerFormat`、`footerFormat` 和 `pointFormat` 的字符串属性的`HTML`文本内容,来自定义浮动提示框的显示内容,此三者可以胜任绝大数情况下的自定义浮动提示框 AATooltip 的任务.
|
||||
|
||||
如仍旧不能满足需求,更可以通过 AATooltip 的 `formatter` 函数来实现视图的特殊定制化 例如,如下配置 AATooltip 实例对象属性
|
||||
|
||||
|
||||
```kotlin
|
||||
val aaTooltip = AATooltip()
|
||||
.useHTML(true)
|
||||
.formatter(
|
||||
"""
|
||||
function () {
|
||||
return ' 🌕 🌖 🌗 🌘 🌑 🌒 🌓 🌔 <br/> '
|
||||
+ ' Support JavaScript Function Just Right Now !!! <br/> '
|
||||
+ ' The Gold Price For <b>2020 '
|
||||
+ this.x
|
||||
+ ' </b> Is <b> '
|
||||
+ this.y
|
||||
+ ' </b> Dollars ';
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
.valueDecimals(2)//设置取值精确到小数点后几位//设置取值精确到小数点后几位
|
||||
.backgroundColor("#000000")
|
||||
.borderColor("#000000")
|
||||
.style(
|
||||
AAStyle()
|
||||
.color("#FFD700")
|
||||
.fontSize("12 px")
|
||||
)
|
||||
|
||||
```
|
||||
即可完成图表的浮动提示框的特殊定制化.得到的自定义浮动提示框的视觉效果图如下👇
|
||||

|
||||
|
||||
### 支持添加值域分割功能⚔
|
||||
|
||||
* 添加值域分割颜色带 `plotBands 🎀`
|
||||

|
||||
|
||||
* 添加值域分割颜色线 `plotLines 🧶`
|
||||

|
||||
|
||||
* 添加值域分割数据列分区 `zones 🧱`
|
||||

|
||||
|
||||
### 支持图表数据的动态滚动刷新
|
||||
|
||||
<div align="center" >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/scrollingUpdateColumnChart.gif' >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/scrollingUpdateLineChart.gif' >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/scrollingUpdateStepAreaChart.gif' >
|
||||
</div>
|
||||
|
||||
### 支持图表数据的动态排序
|
||||
|
||||
<div align="center" >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/DataSortingColumnChart.gif' >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/DataSortingScatterChart.gif' >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/DataSortingBarChart.gif' >
|
||||
</div>
|
||||
|
||||
### 当前已支持的图表类型有十种以上,说明如下
|
||||
|
||||
```kotlin
|
||||
enum class AAChartType(val value: String) {
|
||||
Column ("column"),
|
||||
Bar ("bar"),
|
||||
Area ("area"),
|
||||
Areaspline ("areaspline"),
|
||||
Line ("line"),
|
||||
Spline ("spline"),
|
||||
Scatter ("scatter"),
|
||||
Pie ("pie"),
|
||||
Bubble ("bubble"),
|
||||
Pyramid ("pyramid"),
|
||||
Funnel ("funnel"),
|
||||
Columnrange ("columnrange"),
|
||||
Arearange ("arearange"),
|
||||
Areasplinerange ("areasplinerange"),
|
||||
Boxplot ("boxplot"),
|
||||
Waterfall ("waterfall"),
|
||||
Polygon ("polygon")
|
||||
}
|
||||
```
|
||||
|
||||
### 当前已支持的图表手势缩放类型共有三种,说明如下
|
||||
|
||||
```kotlin
|
||||
enum class AAChartZoomType(val value: String) {
|
||||
None ("none"), //禁用图表手势缩放功能(默认禁用手势缩放)
|
||||
X ("x"), //支持图表 X 轴横向缩放
|
||||
Y ("y"), //支持图表 Y 轴纵向缩放X
|
||||
XY ("xy"), //支持图表 XY 轴纵向缩放
|
||||
}
|
||||
```
|
||||
|
||||
NOTE:例如,设置了`AAChartModel`的缩放属性`zoomType`为`AAChartZoomType.X`,并且将图表进行了手势放大之后,这时候如果想要左右滑动图表,可以使用 **双指点按** 屏幕中的`AAChartView`视图区域进行 **左右拖动** 即可.同时屏幕的右上角会自动出现一个标题为 **"恢复缩放"** 的按钮,点击恢复缩放,图表大小和位置将会回归到原初的样式. 默认为`AAChartZoomType.None`,即禁用缩放功能.
|
||||
|
||||
### 当前已支持的图表渲染动画类型有三十种以上,说明如下
|
||||
|
||||
```kotlin
|
||||
enum class AAChartAnimationType(val value :String){
|
||||
EaseInQuad ("easeInQuad"),
|
||||
EaseOutQuad ("easeOutQuad"),
|
||||
EaseInOutQuad ("easeInOutQuad"),
|
||||
EaseInCubic ("easeInCubic"),
|
||||
EaseOutCubic ("easeOutCubic"),
|
||||
EaseInOutCubic ("easeInOutCubic"),
|
||||
EaseInQuart ("easeInQuart"),
|
||||
EaseOutQuart ("easeOutQuart"),
|
||||
EaseInOutQuart ("easeInOutQuart"),
|
||||
EaseInQuint ("easeInQuint"),
|
||||
EaseOutQuint ("easeOutQuint"),
|
||||
EaseInOutQuint ("easeInOutQuint"),
|
||||
EaseInSine ("easeInSine"),
|
||||
EaseOutSine ("easeOutSine"),
|
||||
EaseInOutSine ("easeInOutSine"),
|
||||
EaseInExpo ("easeInExpo"),
|
||||
EaseOutExpo ("easeOutExpo"),
|
||||
EaseInOutExpo ("easeInOutExpo"),
|
||||
EaseInCirc ("easeInCirc"),
|
||||
EaseOutCirc ("easeOutCirc"),
|
||||
EaseInOutCirc ("easeInOutCirc"),
|
||||
EaseOutBounce ("easeOutBounce"),
|
||||
EaseInBack ("easeInBack"),
|
||||
EaseOutBack ("easeOutBack"),
|
||||
EaseInOutBack ("easeInOutBack"),
|
||||
Elastic ("elastic"),
|
||||
SwingFromTo ("swingFromTo"),
|
||||
SwingFrom ("swingFrom"),
|
||||
SwingTo ("swingTo"),
|
||||
Bounce ("bounce"),
|
||||
BouncePast ("bouncePast"),
|
||||
EaseFromTo ("easeFromTo"),
|
||||
EaseFrom ("easeFrom"),
|
||||
EaseTo ("easeTo"),
|
||||
}
|
||||
```
|
||||
|
||||
以下是**AAInfographics**其中十种图表渲染动画类型
|
||||
|
||||
| Back | Bounce | Circ | Cubic | Elastic |
|
||||
|:---------:|:---------:|:---------:|:---------:|:---------:|
|
||||
| ![][1] | ![][2] | ![][3] | ![][4] | ![][5] |
|
||||
|
||||
|
||||
| Expo | Quad | Quart | Quint | Sine |
|
||||
|:---------:|:---------:|:---------:|:---------:|:---------:|
|
||||
| ![][6] | ![][7] | ![][8] | ![][9] | ![][10] |
|
||||
|
||||
|
||||
## 关于`AAChartModel` 属性说明
|
||||
|
||||
* ### AAChartModel 主要属性说明
|
||||
|
||||
属性名称 | 描述 | 取值范围 |
|
||||
------------ |------------- | ------------- |
|
||||
title | 图表主标题 | 任意有效的字符串 |
|
||||
subtitle | 图表副标题 | 任意有效的字符串 |
|
||||
chartType | 图表类型,可以为`AAChartType`枚举字符串当中指定的任意有效类型.其中有支持`柱状图` 、`条形图` 、`折线图` 、`曲线图` 、`折线填充图` 、`曲线填充图`、`雷达图`、`扇形图`、`气泡图`、`散点图`、`金字塔图`、`漏斗图`、`区域范围图`、`柱形范围图`等多种图形 | AAChartType.Column, <br/> AAChartType.Bar,<br/> AAChartType.Area, <br/> AAChartType.AreaSpline,<br/> AAChartType.Line,<br/> AAChartType.Spline,<br/> AAChartType.Pie,<br/> AAChartType.Bubble, <br/> AAChartType.Scatter,<br/> AAChartType.Pyramid, <br/> AAChartType.Funnel,<br/> AAChartType.Arearange, <br/> AAChartType.Columnrange |
|
||||
stacking| 是否将图表每个数据列的值叠加在一起。 默认的值为`.none`, 即禁用堆叠样式效果.另有常规堆叠样式和百分比堆叠样式可供选择 | AAChartStackingType.None,<br/>AAChartStackingType.Normal,<br/> AAChartStackingType.Percent |
|
||||
symbol | 图表曲线连接点的样式类型.其可供选择的值有`圆`、`正方形`、`钻石`、`常规三角形`和`倒三角形`,默认为混合样式 | AAChartSymbolType.Circle,<br/> AAChartSymbolType.Square,<br/> AAChartSymbolType.Diamond, <br/> AAChartSymbolType.Triangle,<br/> AAChartSymbolType.TriangleDown |
|
||||
colorsTheme | 图表显示的颜色主题效果 |类似此 `arrayOf("#fe117c", "#ffc069", "#06caf4", "#7dffc0")` 有效十六进制颜色字符串数组 |
|
||||
series | 图表的数据列 | AASeriesElement实例对象组成的有效数组,其中每个AASeriesElement都有与之对应的数据、类型、颜色、透明度等具体的值 |
|
||||
|
||||
|
||||
|
||||
更多详尽的图表属性设置参数您可以在 `AAChartModel` 和 `AAOptions` 文件中找到, 详细内容参见 `AAChartCore-Kotlin(AAInfographics)` 源代码.
|
||||
|
||||
|
||||
|
||||
|
||||
## 作者
|
||||
|
||||
An An
|
||||
```java
|
||||
|
||||
_oo0oo_
|
||||
o8888888o
|
||||
88" . "88
|
||||
(| -_- |)
|
||||
0\ = /0
|
||||
___/`---'\___
|
||||
.' \\| |// '.
|
||||
/ \\||| : |||// \
|
||||
/ _||||| -:- |||||- \
|
||||
| | \\\ - /// | |
|
||||
| \_| ''\---/'' |_/ |
|
||||
\ .-\__ '-' ___/-. /
|
||||
___'. .' /--.--\ `. .'___
|
||||
."" '< `.___\_<|>_/___.' >' "".
|
||||
| | : `- \`.;`\ _ /`;.`/ - ` : | |
|
||||
\ \ `_. \_ __\ /__ _/ .-` / /
|
||||
=====`-.____`.___ \_____/___.-`___.-'=====
|
||||
`=---='
|
||||
*******************************************************
|
||||
¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥
|
||||
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
|
||||
$$$$$$$$$$$$$$$$$$$$$$$
|
||||
BUDDHA_BLESS_YOU
|
||||
AWAY_FROM
|
||||
BUG
|
||||
|
||||
```
|
||||
|
||||
## 源代码⛓
|
||||
语言版本 | 项目名称 | 适用平台| 源代码链接|
|
||||
------------ | ------------- |------------- | ------------- |
|
||||
Kotlin | AAInfographics | Android | https://github.com/AAChartModel/AAChartCore-Kotlin |
|
||||
Java | AAChartCore | Android | https://github.com/AAChartModel/AAChartCore |
|
||||
Swift | AAInfographics | iOS |https://github.com/AAChartModel/AAChartKit-Swift |
|
||||
Objective C | AAChartKit | iOS | https://github.com/AAChartModel/AAChartKit |
|
||||
|
||||
|
||||
## 许可证
|
||||
|
||||

|
||||
|
||||
本项目 `AAChartCore`使用 MIT许可证,详情请点击[MIT LICENSE](https://github.com/AAChartModel/AAChartKit-Swift/blob/master/LICENSE),框架所依赖的非框架原有的其他内容仍旧遵循其原有的许可证.
|
||||
|
||||
## 联系方式
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
* 🌕 🌖 🌗 🌘 暖心提示 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* 如果有任何使用上的问题,随时欢迎您在 GitHub 上向我提 issue.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore/issues
|
||||
-------------------------------------------------------------------------------
|
||||
* 如果您想参与到此项目的开源活动中来,也同样随时欢迎您联系我
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 待办清单
|
||||
|
||||
- [x] 支持图形加载完成后用户添加代理事件
|
||||
- [x] 支持图形动态刷新全局内容
|
||||
- [x] 支持图形动态刷新纯数据`(series)`内容
|
||||
- [x] 支持色彩图层渐变效果
|
||||
- [x] 支持横屏(全屏)效果
|
||||
- [x] 支持自由设置图形渲染动画
|
||||
- [x] 支持用户自由配置`AAOptions`模型对象属性
|
||||
- [x] 支持图形堆叠
|
||||
- [x] 支持图形坐标轴反转
|
||||
- [x] 支持渲染散点图
|
||||
- [x] 支持渲染柱形范围图
|
||||
- [x] 支持渲染面积范围图
|
||||
- [x] 支持渲染面积范围均线图
|
||||
- [x] 支持渲染极地图
|
||||
- [x] 支持渲染折线直方图
|
||||
- [x] 支持渲染折线直方填充图
|
||||
- [ ] 支持渲染矩形树状层级关系图
|
||||
- [ ] 支持渲染活动刻度仪表图
|
||||
- [ ] 支持为图形添加点击事件回调
|
||||
- [ ] 支持图形实时刷新纯数据并动态滚动
|
||||
- [ ] 支持已渲染图形生成图片文件
|
||||
- [ ] 支持生成图片文件保存至系统相册
|
||||
|
||||
|
||||
[1]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/1.gif
|
||||
[2]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/2.gif
|
||||
[3]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/3.gif
|
||||
[4]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/4.gif
|
||||
[5]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/5.gif
|
||||
[6]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/6.gif
|
||||
[7]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/7.gif
|
||||
[8]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/8.gif
|
||||
[9]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/9.gif
|
||||
[10]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/10.gif
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,524 @@
|
||||

|
||||
# AAInfographics
|
||||
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin) </br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/LICENSE)</br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin) </br>
|
||||
[](https://github.com/AAChartModel/AAChartCore)</br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin#supported-animation-type-for-now)</br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/CHINESE-README.md)</br>
|
||||
[](https://github.com/AAChartModel/AAChartCore-Kotlin)</br>
|
||||
[](http://isitmaintained.com/project/AAChartModel/AAChartCore-Kotlin "Average time to resolve an issue")</br>
|
||||
[](http://isitmaintained.com/project/AAChartModel/AAChartCore-Kotlin "Percentage of issues still open")
|
||||
|
||||
## [ **English Document 🇬🇧** ](https://github.com/AAChartModel/AAChartCore-Kotlin) | [ **简体中文文档 🇨🇳** ](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/CHINESE-README.md)
|
||||
|
||||
### There is the link of **Java version** of `AAChartCore-Kotlin` as follow
|
||||
#### *https://github.com/AAChartModel/AAChartCore*
|
||||
|
||||
## Preface
|
||||
|
||||
***AAInfographics*** is the `Kotlin` language version of [AAChartKit](https://github.com/AAChartModel/AAChartKit) which is object-oriented, a set of easy-to-use, extremely elegant graphics drawing controls,based on the popular open source front-end chart library *Highcharts*. It makes it very fast to add interactive charts to your mobile projects. It supports single touch-drag for data inspection, multi-touch for zooming, and advanced responsiveness for your apps .
|
||||
|
||||
***
|
||||
## Features
|
||||
|
||||
1. Support `Android`、`Kotlin` & `Java`.
|
||||
2. Powerful,support the `column chart`、`bar chart`、`area chart`、`areaspline chart`、`line chart`、`spline chart`、`radar chart`、`polar chart`、`pie chart`、`bubble chart`、`pyramid chart`、`funnel chart`、`columnrange chart`and other graphics.
|
||||
3. Interactive、animated, the `animation` effect is exquisite 、delicate、 smooth and beautiful.
|
||||
4. Support `chain programming syntax` like system framework.
|
||||
5. `AAChartView + AAChartModel = Chart` In the AAInfographics,it follows a minimalist formula: ` Chart view + Chart model = The chart you want`. Just like the other powerful charts framework [AAChartKit](https://github.com/AAChartModel/AAChartKit)、[AAChartKit-Swift](https://github.com/AAChartModel/AAChartKit-Swift)、[AAChartCore](https://github.com/AAChartModel/AAChartCore).
|
||||
***
|
||||
|
||||
## Appreciation
|
||||
|
||||
<div>
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/ColumnChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/BarChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/AreaChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/LineChart.png' width="24%" >
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/StepAreaChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/loadHtmlCssJsDemo-master/blob/master/AAChartKit/BeautyAppreciation/StepLineChart.png' width="24%" >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/splineChart.png' width="24%" >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/areasplineChart.png' width="24%" >
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/percentStackingAreasplineChart.png' width="24%" >
|
||||
<img src='https://github.com/AAChartModel/Gallery/blob/master/AAInfographics/BubbleChart.png' width="24%">
|
||||
<img src='https://github.com/AAChartModel/Gallery/blob/master/AAInfographics/ArearangeAverageValueChart.png' width="24%">
|
||||
<img src='https://github.com/AAChartModel/Gallery/blob/master/AAInfographics/ColumnMixedLineChart.png' width="24%">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/scatterChart.png' width="24%" >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/boxplotChart.png' width="24%">
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/MirrorColumnChart.png' width="24%">
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/stackingColumnChart.png' width="24%">
|
||||
</div>
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
### Gradle
|
||||
|
||||
|
||||
#### Step 1. Add the JitPack repository to your build file
|
||||
|
||||
Add it in your root build.gradle at the end of repositories:
|
||||
|
||||
```groovy
|
||||
allprojects {
|
||||
repositories {
|
||||
...
|
||||
maven { url 'https://www.jitpack.io' }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Step 2. Add the dependency
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation 'com.github.AAChartModel:AAChartCore-Kotlin:-SNAPSHOT'
|
||||
}
|
||||
```
|
||||
|
||||
You're all set, enjoy!
|
||||
|
||||
## Usage
|
||||
|
||||
1. Create the instance object of chart view:`AAChartView`
|
||||
```xml
|
||||
<com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
android:id="@+id/aa_chart_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</com.github.aachartmodel.aainfographics.aachartcreator.AAChartView>
|
||||
```
|
||||
|
||||
```kotlin
|
||||
val aaChartView = findViewById<AAChartView>(R.id.aa_chart_view)
|
||||
```
|
||||
|
||||
2. Configure the properties of chart model:`AAChartModel`
|
||||
|
||||
```kotlin
|
||||
val aaChartModel : AAChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Area)
|
||||
.title("title")
|
||||
.subtitle("subtitle")
|
||||
.backgroundColor("#4b2b7f")
|
||||
.dataLabelsEnabled(true)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.data(arrayOf(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6)),
|
||||
AASeriesElement()
|
||||
.name("NewYork")
|
||||
.data(arrayOf(0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5)),
|
||||
AASeriesElement()
|
||||
.name("London")
|
||||
.data(arrayOf(0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0)),
|
||||
AASeriesElement()
|
||||
.name("Berlin")
|
||||
.data(arrayOf(3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8))
|
||||
)
|
||||
)
|
||||
```
|
||||
3. Draw the chart(This method is called only for the first time after you create an AAChartView instance object)
|
||||
|
||||
```kotlin
|
||||
//The chart view object calls the instance object of AAChartModel and draws the final graphic
|
||||
aaChartView.aa_drawChartWithChartModel(aaChartModel)
|
||||
```
|
||||
|
||||
4. Finally add this line to your proguard file:
|
||||
```kotlin
|
||||
-keep class com.github.aachartmodel.aainfographics.** { *; }
|
||||
```
|
||||
|
||||
🌹🌹🌹Congratulations! Everything was done!!! You will get what you want!!!
|
||||
|
||||
|
||||
### Update chart content
|
||||
if you want to refresh chart content,you should do something as follow.According to your actual needs, select the function that fits you.
|
||||
|
||||
|
||||
* Only refresh the chart data(This method is recommended to be called for updating the series data dynamically)
|
||||
|
||||
```kotlin
|
||||
//Only refresh the chart series data
|
||||
aaChartView.aa_onlyRefreshTheChartDataWithChartModelSeries(chartModelSeriesArray)
|
||||
```
|
||||
|
||||
* Refresh the chart, minus the chart data (this method is recommended for subsequent refreshes after the first drawing of graphics has completed. If you want to update the chart data only, you should use the function `aa_onlyRefreshTheChartDataWithChartModelSeries`)
|
||||
```kotlin
|
||||
//Refresh the chart after the AAChartModel whole content is updated
|
||||
aaChartView.aa_refreshChartWholeContentWithChartModel(aaChartModel)
|
||||
```
|
||||
|
||||
## Infographics sample
|
||||
|
||||
- ### line chart
|
||||
|
||||

|
||||
|
||||
- ### column chart
|
||||
|
||||

|
||||
|
||||
- ### bar chart
|
||||
|
||||

|
||||
|
||||
- ### special area chart one
|
||||
|
||||

|
||||
|
||||
- ### special area chart two
|
||||
|
||||

|
||||
|
||||
|
||||
- ### special area chart three
|
||||
|
||||

|
||||
|
||||
- ### polar chart
|
||||
|
||||

|
||||
|
||||
- ### radar chart
|
||||
|
||||

|
||||
|
||||
- ### pie chart
|
||||
|
||||

|
||||
|
||||
- ### bubble chart
|
||||
|
||||

|
||||
|
||||
- ### scatter chart
|
||||
|
||||

|
||||
|
||||
- ### arearange chart
|
||||
|
||||

|
||||
|
||||
- ### step area chart
|
||||
|
||||

|
||||
|
||||
- ### mixed chart
|
||||
|
||||

|
||||
|
||||
## More graphics
|
||||
|
||||
>>> * Note: The following `DEMO picture` is a `GIF dynamic picture` which has a size of around *6M*. If you don't see any dynamic preview, then this is because the picture resources were not fully loaded. In such a case please be patient and wait for the contents to finish loading. Maybe you need to reload this page.
|
||||
|
||||

|
||||
|
||||
## Special instructions
|
||||
|
||||
### Support user click events and move over events
|
||||
|
||||
you can monitor the user touch events message through implementing delegate function for AAChartView instance object
|
||||
|
||||
```kotlin
|
||||
interface AAChartViewCallBack {
|
||||
fun chartViewMoveOverEventMessage(aaChartView: AAChartView, messageModel: AAMoveOverEventMessageModel)
|
||||
}
|
||||
```
|
||||
|
||||
The received touch events message contain following content
|
||||
|
||||
```kotlin
|
||||
class AAMoveOverEventMessageModel {
|
||||
var name: String? = null
|
||||
var x: Double? = null
|
||||
var y: Double? = null
|
||||
var category: String? = null
|
||||
var offset: LinkedTreeMap<*, *>? = null
|
||||
var index: Double? = null
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Support for custom the style of chart `AATooltip` through `JavaScript` function
|
||||
|
||||
As we all know, AAInfographics support using HTML String. Most of time, the `headerFormat` 、`pointFormat`、`footerFormat` HTML string is enough for customizing chart tooltip string content, However, sometimes the needs of APP is so weird to satified, in this time, you can even customize the chart tooltip style through `JavaScript` function.
|
||||
|
||||
For example, configuring AATooltip instance object properties as follow:
|
||||
|
||||
|
||||
```kotlin
|
||||
val aaTooltip = AATooltip()
|
||||
.useHTML(true)
|
||||
.formatter(
|
||||
"""
|
||||
function () {
|
||||
return ' 🌕 🌖 🌗 🌘 🌑 🌒 🌓 🌔 <br/> '
|
||||
+ ' Support JavaScript Function Just Right Now !!! <br/> '
|
||||
+ ' The Gold Price For <b>2020 '
|
||||
+ this.x
|
||||
+ ' </b> Is <b> '
|
||||
+ this.y
|
||||
+ ' </b> Dollars ';
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
.valueDecimals(2)//设置取值精确到小数点后几位//设置取值精确到小数点后几位
|
||||
.backgroundColor("#000000")
|
||||
.borderColor("#000000")
|
||||
.style(
|
||||
AAStyle()
|
||||
.color("#FFD700")
|
||||
.fontSize("12 px")
|
||||
)
|
||||
```
|
||||
|
||||
you can get the customized tooltip style chart like this👇
|
||||

|
||||
|
||||
|
||||
### Support value range segmentation
|
||||
|
||||
|
||||
* chart with value range segmentation `bands 🎀`
|
||||

|
||||
|
||||
|
||||
* chart with value range segmentation `lines 🧶`
|
||||

|
||||
|
||||
* chart with value range segmentation `zones 🧱`
|
||||

|
||||
|
||||
|
||||
### Support scrolling update chart data
|
||||
|
||||
<div align="center">
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/scrollingUpdateColumnChart.gif' >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/scrollingUpdateLineChart.gif' >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/scrollingUpdateStepAreaChart.gif' >
|
||||
</div>
|
||||
|
||||
### Support data sorting with animation effect
|
||||
|
||||
<div align="center">
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/DataSortingColumnChart.gif' >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/DataSortingScatterChart.gif' >
|
||||
<img src='https://raw.githubusercontent.com/AAChartModel/Gallery/master/AAChartKit/DataSortingBarChart.gif' >
|
||||
</div>
|
||||
|
||||
### Supported chart type for now
|
||||
|
||||
```kotlin
|
||||
enum class AAChartType(val value: String) {
|
||||
Column ("column"),
|
||||
Bar ("bar"),
|
||||
Area ("area"),
|
||||
Areaspline ("areaspline"),
|
||||
Line ("line"),
|
||||
Spline ("spline"),
|
||||
Scatter ("scatter"),
|
||||
Pie ("pie"),
|
||||
Bubble ("bubble"),
|
||||
Pyramid ("pyramid"),
|
||||
Funnel ("funnel"),
|
||||
Columnrange ("columnrange"),
|
||||
Arearange ("arearange"),
|
||||
Areasplinerange ("areasplinerange"),
|
||||
Boxplot ("boxplot"),
|
||||
Waterfall ("waterfall"),
|
||||
Polygon ("polygon")
|
||||
}
|
||||
```
|
||||
|
||||
### Supported zoom guesture types for now
|
||||
```kotlin
|
||||
enum class AAChartZoomType(val value: String) {
|
||||
None ("none"),
|
||||
X ("x"),
|
||||
Y ("y"),
|
||||
XY ("xy"),
|
||||
}
|
||||
```
|
||||
|
||||
### Supported animation type for now
|
||||
|
||||
```kotlin
|
||||
enum class AAChartAnimationType(val value :String){
|
||||
EaseInQuad ("easeInQuad"),
|
||||
EaseOutQuad ("easeOutQuad"),
|
||||
EaseInOutQuad ("easeInOutQuad"),
|
||||
EaseInCubic ("easeInCubic"),
|
||||
EaseOutCubic ("easeOutCubic"),
|
||||
EaseInOutCubic ("easeInOutCubic"),
|
||||
EaseInQuart ("easeInQuart"),
|
||||
EaseOutQuart ("easeOutQuart"),
|
||||
EaseInOutQuart ("easeInOutQuart"),
|
||||
EaseInQuint ("easeInQuint"),
|
||||
EaseOutQuint ("easeOutQuint"),
|
||||
EaseInOutQuint ("easeInOutQuint"),
|
||||
EaseInSine ("easeInSine"),
|
||||
EaseOutSine ("easeOutSine"),
|
||||
EaseInOutSine ("easeInOutSine"),
|
||||
EaseInExpo ("easeInExpo"),
|
||||
EaseOutExpo ("easeOutExpo"),
|
||||
EaseInOutExpo ("easeInOutExpo"),
|
||||
EaseInCirc ("easeInCirc"),
|
||||
EaseOutCirc ("easeOutCirc"),
|
||||
EaseInOutCirc ("easeInOutCirc"),
|
||||
EaseOutBounce ("easeOutBounce"),
|
||||
EaseInBack ("easeInBack"),
|
||||
EaseOutBack ("easeOutBack"),
|
||||
EaseInOutBack ("easeInOutBack"),
|
||||
Elastic ("elastic"),
|
||||
SwingFromTo ("swingFromTo"),
|
||||
SwingFrom ("swingFrom"),
|
||||
SwingTo ("swingTo"),
|
||||
Bounce ("bounce"),
|
||||
BouncePast ("bouncePast"),
|
||||
EaseFromTo ("easeFromTo"),
|
||||
EaseFrom ("easeFrom"),
|
||||
EaseTo ("easeTo"),
|
||||
}
|
||||
```
|
||||
|
||||
Here are the ten concrete animation types of **AAInfographics**
|
||||
|
||||
| Back | Bounce | Circ | Cubic | Elastic |
|
||||
|:---------:|:---------:|:---------:|:---------:|:---------:|
|
||||
| ![][1] | ![][2] | ![][3] | ![][4] | ![][5] |
|
||||
|
||||
|
||||
| Expo | Quad | Quart | Quint | Sine |
|
||||
|:---------:|:---------:|:---------:|:---------:|:---------:|
|
||||
| ![][6] | ![][7] | ![][8] | ![][9] | ![][10] |
|
||||
|
||||
|
||||
## About AAChartModel
|
||||
|
||||
* ### AAChartModel:chart basic properties instruction
|
||||
|
||||
Property name | Description | Value Range |
|
||||
------------ | ------------- | ------------- |
|
||||
title | The chart title | Any valid string |
|
||||
subtitle | The chart subtitle | Any valid string |
|
||||
chartType | The default series type for the chart. Can be any of the chart types listed under `AAChartType`. | AAChartType.Column, <br/> AAChartType.Bar,<br/> AAChartType.Area, <br/> AAChartType.AreaSpline,<br/> AAChartType.Line,<br/> AAChartType.Spline,<br/> AAChartType.Pie,<br/> AAChartType.Bubble, <br/> AAChartType.Scatter,<br/> AAChartType.Pyramid, <br/> AAChartType.Funnel,<br/> AAChartType.Arearange, <br/> AAChartType.Columnrange |
|
||||
stacking| Whether to stack the values of each series on top of each other. Possible values are null to disable, "normal" to stack by value or "percent". When stacking is enabled, data must be sorted in ascending X order | AAChartStackingType.None,<br/>AAChartStackingType.Normal,<br/> AAChartStackingType.Percent |
|
||||
symbol | A predefined shape or symbol for the marker. When null, the symbol is pulled from options.symbols. Other possible values are "circle", "square", "diamond", "triangle" and "triangle-down" | AAChartSymbolType.Circle,<br/> AAChartSymbolType.Square,<br/> AAChartSymbolType.Diamond, <br/> AAChartSymbolType.Triangle,<br/> AAChartSymbolType.TriangleDown |
|
||||
colorsTheme | the colors theme of chart style |default value is `arrayOf("#fe117c", "#ffc069", "#06caf4", "#7dffc0")` |
|
||||
series | the series data of chart | a list made of AASeriesElement instance objects ,every AASeriesElement has its own type 、name、data、color、opacity value ect |
|
||||
|
||||
|
||||
|
||||
More detailed chart property setting parameters can be found in the ʻAAChartModel` and ʻAAOptions` files. For details, please refer to the ʻAAChartCore-Kotlin(AAInfographics)` source code.
|
||||
|
||||
|
||||
|
||||
## Created By
|
||||
|
||||
An An
|
||||
``` java
|
||||
"CODE IS FAR AWAY FROM BUG WITH THE ANIMAL PROTECTING"
|
||||
|
||||
* ##2 ##2
|
||||
* ┏-##1 ┏-##1
|
||||
* ┏_┛ ┻---━┛_┻━━┓
|
||||
* ┃ ┃
|
||||
* ┃ ━ ┃
|
||||
* ┃ @^ @^ ┃
|
||||
* ┃ ┃
|
||||
* ┃ ┻ ┃
|
||||
* ┃_ _┃
|
||||
* ┗━┓ ┏━┛
|
||||
* ┃ ┃神兽保佑
|
||||
* ┃ ┃永无BUG!
|
||||
* ┃ ┗━━━┓----|
|
||||
* ┃ ┣┓}}}
|
||||
* ┃ ┏┛
|
||||
* ┗┓&&&┓-┏&&&┓┏┛-|
|
||||
* ┃┫┫ ┃┫┫
|
||||
* ┗┻┛ ┗┻┛
|
||||
*
|
||||
*
|
||||
"CODE IS FAR AWAY FROM BUG WITH THE ANIMAL PROTECTING"
|
||||
```
|
||||
|
||||
## Source Code⛓
|
||||
|
||||
Language Version | Project Name | Source Code Link |
|
||||
------------ | ------------- | ------------- |
|
||||
Kotlin | AAInfographics | https://github.com/AAChartModel/AAChartCore-Kotlin |
|
||||
Java | AAChartCore | https://github.com/AAChartModel/AAChartCore |
|
||||
Swift | AAInfographics | https://github.com/AAChartModel/AAChartKit-Swift |
|
||||
Objective C | AAChartKit | https://github.com/AAChartModel/AAChartKit |
|
||||
|
||||
|
||||
## LICENSE
|
||||
|
||||

|
||||
|
||||
AAInfographics is available under the MIT license. See the [LICENSE](https://github.com/AAChartModel/AAChartCore-Kotlin/blob/master/LICENSE) file for more information.
|
||||
|
||||
## Contact
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
* 🌕 🌖 🌗 🌘 WARM TIPS!!! 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
-------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## Todo list
|
||||
|
||||
- [x] Support for the user to add delegate events after the graphics content loading was completed
|
||||
- [x] Support graphics to refresh global content dynamically
|
||||
- [x] Support graphics to refresh pure data (`series`) content dynamically
|
||||
- [x] Support color layer gradient effects
|
||||
- [x] Support horizontal screen (full screen) effect
|
||||
- [x] Support setting graphics rendering animation freely
|
||||
- [x] Support for users to configure `AAOptions` model object properties freely
|
||||
- [x] Support stacking the graphics
|
||||
- [x] Support reversing the graphics axis
|
||||
- [x] Support rendering the scatter chart
|
||||
- [x] Support rendering the column range map
|
||||
- [x] Support rendering the area range graph
|
||||
- [x] Support rendering the polar chart
|
||||
- [x] Support rendering the step line chart
|
||||
- [x] Support rendering the step area chart
|
||||
- [ ] Support rendering the rectangular tree hierarchy diagrams
|
||||
- [ ] Support rendering the circular progress bar chart
|
||||
- [ ] Support adding clicked event callbacks for graphics
|
||||
- [ ] Support graphics to refresh pure data in real time and scroll dynamically
|
||||
- [ ] Support rendered graphics to generate image files
|
||||
- [ ] Support generating image files saved to the system album
|
||||
|
||||
|
||||
[1]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/1.gif
|
||||
[2]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/2.gif
|
||||
[3]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/3.gif
|
||||
[4]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/4.gif
|
||||
[5]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/5.gif
|
||||
[6]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/6.gif
|
||||
[7]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/7.gif
|
||||
[8]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/8.gif
|
||||
[9]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/9.gif
|
||||
[10]: https://raw.githubusercontent.com/adad184/MMTweenAnimation/master/Images/10.gif
|
||||
@@ -0,0 +1,44 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath(Libs.com_android_tools_build_gradle)
|
||||
classpath(Libs.org_jetbrains_kotlin_kotlin_gradle_plugin)
|
||||
classpath(Libs.com_jfrog_bintray_gradle_bintray_plugin)
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
mavenPublish
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven(url = "https://jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
task<Delete>("clean") {
|
||||
delete(rootProject.buildDir)
|
||||
}
|
||||
|
||||
tasks.withType<Javadoc> {
|
||||
options {
|
||||
this as StandardJavadocDocletOptions
|
||||
addStringOption("Xdoclint:none", "-quiet")
|
||||
addStringOption("encoding", "UTF-8")
|
||||
}
|
||||
}
|
||||
|
||||
//For Groovy build.gradle files
|
||||
project.extra.apply {
|
||||
set("minSdkVersion", AndroidConstants.minSdkVersion)
|
||||
set("targetSdkVersion", AndroidConstants.targetSdkVersion)
|
||||
set("compileSdkVersion", AndroidConstants.compileSdkVersions)
|
||||
set("buildToolsVersion", AndroidConstants.buildToolsVersion)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import org.gradle.plugin.use.PluginDependenciesSpec
|
||||
import org.gradle.plugin.use.PluginDependencySpec
|
||||
|
||||
object AndroidConstants {
|
||||
const val minSdkVersion = 19
|
||||
const val targetSdkVersion = 30
|
||||
const val compileSdkVersions = 30
|
||||
const val buildToolsVersion = "30.0.2"
|
||||
}
|
||||
|
||||
object Versions {
|
||||
const val build_gradle_version = "7.4.1"
|
||||
const val kotlin_gradle_plugin_version = "1.9.23"
|
||||
const val bintray_plugin_version = "1.8.5"
|
||||
|
||||
const val bintray_version = "1.8.5"
|
||||
const val kotlin_stdlib_version = "1.4.10"
|
||||
const val gson_version = "2.8.6"
|
||||
}
|
||||
|
||||
object Libs {
|
||||
const val com_jfrog_bintray = "com.jfrog.bintray.gradle"
|
||||
const val maven_publish = "maven-publish"
|
||||
|
||||
const val com_android_tools_build_gradle = "com.android.tools.build:gradle:${Versions.build_gradle_version}"
|
||||
const val org_jetbrains_kotlin_kotlin_gradle_plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin_gradle_plugin_version}"
|
||||
const val com_jfrog_bintray_gradle_bintray_plugin = com_jfrog_bintray + ":gradle-bintray-plugin:${Versions.bintray_plugin_version}"
|
||||
|
||||
const val kotlin_jdk = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Versions.kotlin_stdlib_version}"
|
||||
const val gson = "com.google.code.gson:gson:${Versions.gson_version}"
|
||||
}
|
||||
|
||||
val PluginDependenciesSpec.mavenPublish: PluginDependencySpec
|
||||
inline get() = id(Libs.maven_publish)
|
||||
|
||||
val PluginDependenciesSpec.bintray: PluginDependencySpec
|
||||
inline get() = id(Libs.com_jfrog_bintray).version(Versions.bintray_version)
|
||||
@@ -0,0 +1,84 @@
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
kotlin("android")
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath(Libs.com_jfrog_bintray_gradle_bintray_plugin)
|
||||
}
|
||||
}
|
||||
apply(plugin = Libs.maven_publish)
|
||||
|
||||
android {
|
||||
compileSdkVersion(AndroidConstants.compileSdkVersions)
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion(AndroidConstants.minSdkVersion)
|
||||
targetSdkVersion(AndroidConstants.targetSdkVersion)
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(Libs.gson)
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
configure<PublishingExtension> {
|
||||
val artifact = "charts"
|
||||
val publishedGroupId = "com.github.aachartmodel.aainfographics"
|
||||
val libraryName = "AAChartCore-Kotlin"
|
||||
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
groupId = publishedGroupId
|
||||
artifactId = artifact
|
||||
version = "1.0.0"
|
||||
|
||||
artifact(tasks.getByName("sourcesJar"))
|
||||
artifact("$buildDir/outputs/aar/${artifactId}-release.aar") {
|
||||
builtBy(tasks.getByName("assemble"))
|
||||
}
|
||||
|
||||
pom {
|
||||
packaging = "aar"
|
||||
name.set(libraryName)
|
||||
licenses {
|
||||
license {
|
||||
name.set("The Apache Software License, Version 2.0")
|
||||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
}
|
||||
}
|
||||
withXml {
|
||||
val dependenciesNode = asNode().appendNode("dependencies")
|
||||
// note: replace with the desired configuration (ex: api, testImplementation, etc...)
|
||||
configurations.getByName("implementation") {
|
||||
dependencies.forEach {
|
||||
val dependencyNode = dependenciesNode.appendNode("dependency")
|
||||
dependencyNode.appendNode("groupId", it.group)
|
||||
dependencyNode.appendNode("artifactId", it.name)
|
||||
dependencyNode.appendNode("version", it.version)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val sourcesJar by tasks.registering(Jar::class) {
|
||||
archiveClassifier.set("sources")
|
||||
from(android.sourceSets.getByName("main").java.srcDirs)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<manifest package="com.github.aachartmodel.aainfographics" />
|
||||
@@ -0,0 +1,35 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=3.0,user-scalable = no"
|
||||
name="viewport">
|
||||
<title>AAChartKit-Swift</title>
|
||||
|
||||
<script src="AAChartView.js" ></script>
|
||||
<script src="AAHighcharts.js"></script>
|
||||
<script src="AAHighcharts-More.js"></script>
|
||||
<script src="AAFunnel.js"></script>
|
||||
<script src="AAEasing.js"></script>
|
||||
<script src="AARounded-Corners.js"></script>
|
||||
|
||||
<!--<script src = "https://img.hcharts.cn/highcharts/themes/dark-unica.js">-->
|
||||
<!--</script>-->
|
||||
|
||||
<!--<!–若介意本地js代码体积(250KB左右)过大,可换用加载网络js代码 –>-->
|
||||
<!--<script src="https://img.hcharts.cn/highcharts/highcharts.js">-->
|
||||
<!--</script>-->
|
||||
<!--<script src="https://img.hcharts.cn/highcharts/highcharts-more.js">-->
|
||||
<!--</script>-->
|
||||
|
||||
<style>
|
||||
*{
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin:0px 0px 0px 0px;">
|
||||
<div id="container" style="width:100%; height: 100%;"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,153 @@
|
||||
|
||||
var aaGlobalChart;
|
||||
|
||||
function loadTheHighChartView (sender,receivedWidth, receivedHeight) {
|
||||
var aaOptions = JSON.parse(sender, function (key, value) {
|
||||
if ( typeof(value) == 'string'
|
||||
&& value.indexOf('function') != -1) {
|
||||
return eval(value)
|
||||
}
|
||||
return value;
|
||||
});
|
||||
|
||||
if (aaOptions.xAxisArray) {
|
||||
aaOptions.xAxis = aaOptions.xAxisArray
|
||||
}
|
||||
|
||||
if (aaOptions.yAxisArray) {
|
||||
aaOptions.yAxis = aaOptions.yAxisArray
|
||||
}
|
||||
|
||||
if (aaOptions.defaultOptions) {
|
||||
Highcharts.setOptions({
|
||||
lang: aaOptions.defaultOptions
|
||||
});
|
||||
}
|
||||
|
||||
if (aaOptions.plotOptions) {
|
||||
configurePlotOptions(aaOptions);
|
||||
}
|
||||
|
||||
aaGlobalChart = Highcharts.chart('container', aaOptions);
|
||||
//全局配置(可通过全局配置设置主题)https://api.hcharts.cn/highcharts#Highcharts.setOptions
|
||||
};
|
||||
|
||||
function configurePlotOptions(aaOptions) {
|
||||
var aaPlotOptions = aaOptions.plotOptions;
|
||||
var animation = aaPlotOptions.series.animation;
|
||||
if (animation) {//懒调用(只有在 AAChartModel 实例对象设置了 animationType 属性值的时候才会调用设置动画类型的函数,否则不调用)
|
||||
var animationEasingType = animation.easing;
|
||||
animation.easing = configureTheChartAnimationEasingType(animationEasingType);
|
||||
}
|
||||
// 添加鼠标事件
|
||||
if (aaOptions.touchEventEnabled == true && aaPlotOptions.series) {
|
||||
configureChartTouchEvent(aaPlotOptions);
|
||||
}
|
||||
}
|
||||
|
||||
function configureChartTouchEvent(aaPlotOptions) {
|
||||
var mouseOverFunc = function(){
|
||||
var message = {
|
||||
name: this.series.name,
|
||||
y :this.y,
|
||||
x: this.x,
|
||||
category: this.category,
|
||||
offset: {plotX:this.plotX,plotY:this.plotY},
|
||||
index: this.index,
|
||||
};
|
||||
|
||||
var messageStr = JSON.stringify(message);
|
||||
window.androidObject.androidMethod(messageStr);
|
||||
};
|
||||
|
||||
if (aaPlotOptions.series.point) {// set property directly for series point
|
||||
aaPlotOptions.series.point.events.mouseOver = mouseOverFunc;
|
||||
} else {// create a new series point object instance
|
||||
var seriesPoint = {
|
||||
events:{
|
||||
mouseOver: mouseOverFunc,
|
||||
}
|
||||
};
|
||||
aaPlotOptions.series.point = seriesPoint;
|
||||
}
|
||||
}
|
||||
|
||||
function onlyRefreshTheChartDataWithSeries(receivedSeries, animation) {
|
||||
var receivedSeriesArr = JSON.parse(receivedSeries);
|
||||
var seriesArrLength = receivedSeriesArr.length;
|
||||
for (var i = 0; i < seriesArrLength; i++) {
|
||||
var receivedSeriesElementData = receivedSeriesArr[i].data;
|
||||
// 获取series
|
||||
var seriesElement = aaGlobalChart.series[i];
|
||||
// 执行只刷新数据的函数
|
||||
seriesElement.setData(receivedSeriesElementData, false);
|
||||
}
|
||||
|
||||
var animationBool = (animation == "true") ? true:false;
|
||||
aaGlobalChart.redraw(animationBool);
|
||||
}
|
||||
|
||||
function updateChart(optionsStr, redraw) {
|
||||
var options = JSON.parse(optionsStr);
|
||||
aaGlobalChart.update(options,redraw);
|
||||
}
|
||||
|
||||
function addPointToChartSeries(elementIndex, optionsStr, redraw, shift, animation) {
|
||||
var options = JSON.parse(optionsStr);
|
||||
var redrawBool = (redraw == "true") ? true:false;
|
||||
var shiftBool = (shift == "true") ? true:false;
|
||||
var animationBool = (animation == "true") ? true:false;
|
||||
|
||||
var seriesElement = aaGlobalChart.series[elementIndex];
|
||||
seriesElement.addPoint(options, redrawBool, shiftBool, animationBool);
|
||||
}
|
||||
|
||||
//pragma mark -- setter method
|
||||
function setTheChartViewContentWidth(receivedWidth) {
|
||||
var container = document.getElementById('container'); //获得元素
|
||||
container.style.width = receivedWidth; //设置宽度
|
||||
aaGlobalChart.reflow();
|
||||
}
|
||||
|
||||
function setTheChartViewContentHeight(receivedHeight) {
|
||||
var container = document.getElementById('container'); //获得元素
|
||||
container.style.height = receivedHeight; //设置高度
|
||||
aaGlobalChart.reflow();
|
||||
}
|
||||
|
||||
function setChartSeriesHidden(hidden) {
|
||||
for (var i = 0; i < aaGlobalChart.series.length; i++) {
|
||||
var seriesElement = aaGlobalChart.series[i];
|
||||
if (hidden == true) {
|
||||
seriesElement.hide();
|
||||
} else {
|
||||
seriesElement.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showTheSeriesElementContentWithIndex(elementIndex) {
|
||||
var seriesElement = aaGlobalChart.series[elementIndex];
|
||||
seriesElement.show();
|
||||
}
|
||||
|
||||
function hideTheSeriesElementContentWithIndex(elementIndex) {
|
||||
var seriesElement = aaGlobalChart.series[elementIndex];
|
||||
seriesElement.hide();
|
||||
}
|
||||
|
||||
function addElementToChartSeriesWithElement(elementStr) {
|
||||
var seriesElement = JSON.parse(elementStr);
|
||||
aaGlobalChart.addSeries(seriesElement);
|
||||
}
|
||||
|
||||
function removeElementFromChartSeriesWithElementIndex(elementIndex) {
|
||||
var seriesElement = aaGlobalChart.series[elementIndex];
|
||||
if (seriesElement) {
|
||||
seriesElement.remove(true);
|
||||
}
|
||||
}
|
||||
|
||||
function evaluateTheJavaScriptStringFunction(jsStringFunction) {
|
||||
eval(jsStringFunction);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
function configureTheChartAnimationEasingType(easingType){var animationObject={easeInQuad:function(pos){return Math.pow(pos,2)},easeOutQuad:function(pos){return -(Math.pow((pos-1),2)-1)},easeInOutQuad:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,2)}return -0.5*((pos-=2)*pos-2)},easeInCubic:function(pos){return Math.pow(pos,3)},easeOutCubic:function(pos){return(Math.pow((pos-1),3)+1)},easeInOutCubic:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,3)}return 0.5*(Math.pow((pos-2),3)+2)},easeInQuart:function(pos){return Math.pow(pos,4)},easeOutQuart:function(pos){return -(Math.pow((pos-1),4)-1)},easeInOutQuart:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,4)}return -0.5*((pos-=2)*Math.pow(pos,3)-2)},easeInQuint:function(pos){return Math.pow(pos,5)},easeOutQuint:function(pos){return(Math.pow((pos-1),5)+1)},easeInOutQuint:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,5)}return 0.5*(Math.pow((pos-2),5)+2)},easeInSine:function(pos){return -Math.cos(pos*(Math.PI/2))+1},easeOutSine:function(pos){return Math.sin(pos*(Math.PI/2))},easeInOutSine:function(pos){return(-0.5*(Math.cos(Math.PI*pos)-1))},easeInExpo:function(pos){return(pos===0)?0:Math.pow(2,10*(pos-1))},easeOutExpo:function(pos){return(pos===1)?1:-Math.pow(2,-10*pos)+1},easeInOutExpo:function(pos){if(pos===0){return 0}if(pos===1){return 1}if((pos/=0.5)<1){return 0.5*Math.pow(2,10*(pos-1))}return 0.5*(-Math.pow(2,-10*--pos)+2)},easeInCirc:function(pos){return -(Math.sqrt(1-(pos*pos))-1)},easeOutCirc:function(pos){return Math.sqrt(1-Math.pow((pos-1),2))},easeInOutCirc:function(pos){if((pos/=0.5)<1){return -0.5*(Math.sqrt(1-pos*pos)-1)}return 0.5*(Math.sqrt(1-(pos-=2)*pos)+1)},easeOutBounce:function(pos){if((pos)<(1/2.75)){return(7.5625*pos*pos)}else{if(pos<(2/2.75)){return(7.5625*(pos-=(1.5/2.75))*pos+0.75)}else{if(pos<(2.5/2.75)){return(7.5625*(pos-=(2.25/2.75))*pos+0.9375)}else{return(7.5625*(pos-=(2.625/2.75))*pos+0.984375)}}}},easeInBack:function(pos){var s=1.70158;return(pos)*pos*((s+1)*pos-s)},easeOutBack:function(pos){var s=1.70158;return(pos=pos-1)*pos*((s+1)*pos+s)+1},easeInOutBack:function(pos){var s=1.70158;if((pos/=0.5)<1){return 0.5*(pos*pos*(((s*=(1.525))+1)*pos-s))}return 0.5*((pos-=2)*pos*(((s*=(1.525))+1)*pos+s)+2)},elastic:function(pos){return -1*Math.pow(4,-8*pos)*Math.sin((pos*6-1)*(2*Math.PI)/2)+1},swingFromTo:function(pos){var s=1.70158;return((pos/=0.5)<1)?0.5*(pos*pos*(((s*=(1.525))+1)*pos-s)):0.5*((pos-=2)*pos*(((s*=(1.525))+1)*pos+s)+2)},swingFrom:function(pos){var s=1.70158;return pos*pos*((s+1)*pos-s)},swingTo:function(pos){var s=1.70158;return(pos-=1)*pos*((s+1)*pos+s)+1},bounce:function(pos){if(pos<(1/2.75)){return(7.5625*pos*pos)}else{if(pos<(2/2.75)){return(7.5625*(pos-=(1.5/2.75))*pos+0.75)}else{if(pos<(2.5/2.75)){return(7.5625*(pos-=(2.25/2.75))*pos+0.9375)}else{return(7.5625*(pos-=(2.625/2.75))*pos+0.984375)}}}},bouncePast:function(pos){if(pos<(1/2.75)){return(7.5625*pos*pos)}else{if(pos<(2/2.75)){return 2-(7.5625*(pos-=(1.5/2.75))*pos+0.75)}else{if(pos<(2.5/2.75)){return 2-(7.5625*(pos-=(2.25/2.75))*pos+0.9375)}else{return 2-(7.5625*(pos-=(2.625/2.75))*pos+0.984375)}}}},easeFromTo:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,4)}return -0.5*((pos-=2)*Math.pow(pos,3)-2)},easeFrom:function(pos){return Math.pow(pos,4)},easeTo:function(pos){return Math.pow(pos,0.25)}};return animationObject[easingType]};
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
Highcharts JS v10.0.0 (2022-03-07)
|
||||
|
||||
Highcharts funnel module
|
||||
|
||||
(c) 2010-2021 Torstein Honsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/funnel",["highcharts"],function(n){a(n);a.Highcharts=n;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function n(a,l,f,d){a.hasOwnProperty(l)||(a[l]=d.apply(null,f),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:l,module:a[l]}})))}a=a?a._modules:{};n(a,"Series/Funnel/FunnelSeries.js",
|
||||
[a["Core/Chart/Chart.js"],a["Core/Globals.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,l,f,d){var n=this&&this.__extends||function(){var a=function(b,g){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,e){g.__proto__=e}||function(g,e){for(var a in e)e.hasOwnProperty(a)&&(g[a]=e[a])};return a(b,g)};return function(b,g){function D(){this.constructor=b}a(b,g);b.prototype=null===g?Object.create(g):(D.prototype=g.prototype,new D)}}(),J=l.noop,y=f.series,
|
||||
c=f.seriesTypes.pie;l=d.addEvent;var z=d.extend,L=d.fireEvent,A=d.isArray,B=d.merge,I=d.pick;d=function(a){function b(){var g=null!==a&&a.apply(this,arguments)||this;g.data=void 0;g.options=void 0;g.points=void 0;return g}n(b,a);b.prototype.alignDataLabel=function(g,a,e,b,k){var u=g.series;b=u.options.reversed;var h=g.dlBox||g.shapeArgs,d=e.align,c=e.verticalAlign,f=((u.options||{}).dataLabels||{}).inside,m=u.center[1];u=u.getWidthAt((b?2*m-g.plotY:g.plotY)-h.height/2+a.height);u="middle"===c?(h.topWidth-
|
||||
h.bottomWidth)/4:(u-h.bottomWidth)/2;m=h.y;var p=h.x,D=I(a.height,a.getBBox().height);"middle"===c?m=h.y-h.height/2+D/2:"top"===c&&(m=h.y-h.height+D+e.padding);if("top"===c&&!b||"bottom"===c&&b||"middle"===c)"right"===d?p=h.x-e.padding+u:"left"===d&&(p=h.x+e.padding-u);b={x:p,y:b?m-h.height:m,width:h.bottomWidth,height:h.height};e.verticalAlign="bottom";f&&!g.visible||y.prototype.alignDataLabel.call(this,g,a,e,b,k);f&&(!g.visible&&g.dataLabel&&(g.dataLabel.placed=!1),g.contrastColor&&a.css({color:g.contrastColor}))};
|
||||
b.prototype.drawDataLabels=function(){var a=this.data,b=this.options.dataLabels.distance,e,c=a.length;for(this.center[2]-=2*b;c--;){var k=a[c];var d=(e=k.half)?1:-1;var h=k.plotY;k.labelDistance=I(k.options.dataLabels&&k.options.dataLabels.distance,b);this.maxLabelDistance=Math.max(k.labelDistance,this.maxLabelDistance||0);var y=this.getX(h,e,k);k.labelPosition={natural:{x:0,y:h},"final":{},alignment:e?"right":"left",connectorPosition:{breakAt:{x:y+(k.labelDistance-5)*d,y:h},touchingSliceAt:{x:y+
|
||||
k.labelDistance*d,y:h}}}}f.seriesTypes[this.options.dataLabels.inside?"column":"pie"].prototype.drawDataLabels.call(this)};b.prototype.translate=function(){function a(a,b){return/%$/.test(a)?b*parseInt(a,10)/100:parseInt(a,10)}var b=0,e=this,c=e.chart,k=e.options,d=k.reversed,h=k.ignoreHiddenPoint,f=c.plotWidth;c=c.plotHeight;var y=0,l=k.center,m=a(l[0],f),p=a(l[1],c),n=a(k.width,f),v,w=a(k.height,c),z=a(k.neckWidth,f),H=a(k.neckHeight,c),A=p-w/2+w-H;f=e.data;var B,F,K="left"===k.dataLabels.position?
|
||||
1:0,E,q,G,x,r,C,t;e.getWidthAt=function(a){var b=p-w/2;return a>A||w===H?z:z+(n-z)*(1-(a-b)/(w-H))};e.getX=function(a,b,c){return m+(b?-1:1)*(e.getWidthAt(d?2*p-a:a)/2+c.labelDistance)};e.center=[m,p,w];e.centerX=m;f.forEach(function(a){h&&!1===a.visible||(b+=a.y)});f.forEach(function(a){t=null;F=b?a.y/b:0;q=p-w/2+y*w;r=q+F*w;v=e.getWidthAt(q);E=m-v/2;G=E+v;v=e.getWidthAt(r);x=m-v/2;C=x+v;q>A?(E=x=m-z/2,G=C=m+z/2):r>A&&(t=r,v=e.getWidthAt(A),x=m-v/2,C=x+v,r=A);d&&(q=2*p-q,r=2*p-r,null!==t&&(t=2*p-
|
||||
t));B=[["M",E,q],["L",G,q],["L",C,r]];null!==t&&B.push(["L",C,t],["L",x,t]);B.push(["L",x,r],["Z"]);a.shapeType="path";a.shapeArgs={d:B};a.percentage=100*F;a.plotX=m;a.plotY=(q+(t||r))/2;a.tooltipPos=[m,a.plotY];a.dlBox={x:x,y:q,topWidth:G-E,bottomWidth:C-x,height:Math.abs(I(t,r)-q),width:NaN};a.slice=J;a.half=K;h&&!1===a.visible||(y+=F)});L(e,"afterTranslate")};b.prototype.sortByAngle=function(a){a.sort(function(a,b){return a.plotY-b.plotY})};b.defaultOptions=B(c.defaultOptions,{animation:!1,center:["50%",
|
||||
"50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0,dataLabels:{connectorWidth:1,verticalAlign:"middle"},states:{select:{color:"#cccccc",borderColor:"#000000"}}});return b}(c);z(d.prototype,{animate:J});l(a,"afterHideAllOverlappingLabels",function(){this.series.forEach(function(a){var b=a.options&&a.options.dataLabels;A(b)&&(b=b[0]);a.is("pie")&&a.placeDataLabels&&b&&!b.inside&&a.placeDataLabels()})});f.registerSeriesType("funnel",d);"";return d});n(a,"Series/Pyramid/PyramidSeries.js",
|
||||
[a["Series/Funnel/FunnelSeries.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,l,f){var d=this&&this.__extends||function(){var a=function(d,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])};return a(d,c)};return function(d,c){function f(){this.constructor=d}a(d,c);d.prototype=null===c?Object.create(c):(f.prototype=c.prototype,new f)}}(),n=f.merge;f=function(f){function l(){var a=
|
||||
null!==f&&f.apply(this,arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}d(l,f);l.defaultOptions=n(a.defaultOptions,{neckWidth:"0%",neckHeight:"0%",reversed:!0});return l}(a);l.registerSeriesType("pyramid",f);"";return f});n(a,"masters/modules/funnel.src.js",[],function(){})});
|
||||
//# sourceMappingURL=funnel.js.map
|
||||
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
Highcharts JS v10.0.0 (2022-03-07)
|
||||
|
||||
(c) 2009-2021 Torstein Honsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/highcharts-more",["highcharts"],function(A){d(A);d.Highcharts=A;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function A(d,e,l,a){d.hasOwnProperty(e)||(d[e]=a.apply(null,l),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:d[e]}})))}d=d?d._modules:{};A(d,
|
||||
"Extensions/Pane.js",[d["Core/Chart/Chart.js"],d["Series/CenteredUtilities.js"],d["Core/Globals.js"],d["Core/Pointer.js"],d["Core/Utilities.js"]],function(d,e,l,a,c){function t(b,m,n){return Math.sqrt(Math.pow(b-n[0],2)+Math.pow(m-n[1],2))<=n[2]/2}var p=c.addEvent,k=c.extend,x=c.merge,w=c.pick,b=c.splat;d.prototype.collectionsWithUpdate.push("pane");c=function(){function g(b,g){this.options=this.chart=this.center=this.background=void 0;this.coll="pane";this.defaultOptions={center:["50%","50%"],size:"85%",
|
||||
innerSize:"0%",startAngle:0};this.defaultBackgroundOptions={shape:"circle",borderWidth:1,borderColor:"#cccccc",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#ffffff"],[1,"#e6e6e6"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"};this.init(b,g)}g.prototype.init=function(b,g){this.chart=g;this.background=[];g.pane.push(this);this.setOptions(b)};g.prototype.setOptions=function(b){this.options=x(this.defaultOptions,this.chart.angular?{background:{}}:void 0,
|
||||
b)};g.prototype.render=function(){var g=this.options,n=this.options.background,q=this.chart.renderer;this.group||(this.group=q.g("pane-group").attr({zIndex:g.zIndex||0}).add());this.updateCenter();if(n)for(n=b(n),g=Math.max(n.length,this.background.length||0),q=0;q<g;q++)n[q]&&this.axis?this.renderBackground(x(this.defaultBackgroundOptions,n[q]),q):this.background[q]&&(this.background[q]=this.background[q].destroy(),this.background.splice(q,1))};g.prototype.renderBackground=function(b,g){var n="animate",
|
||||
m={"class":"highcharts-pane "+(b.className||"")};this.chart.styledMode||k(m,{fill:b.backgroundColor,stroke:b.borderColor,"stroke-width":b.borderWidth});this.background[g]||(this.background[g]=this.chart.renderer.path().add(this.group),n="attr");this.background[g][n]({d:this.axis.getPlotBandPath(b.from,b.to,b)}).attr(m)};g.prototype.updateCenter=function(b){this.center=(b||this.axis||{}).center=e.getCenter.call(this)};g.prototype.update=function(b,g){x(!0,this.options,b);this.setOptions(this.options);
|
||||
this.render();this.chart.axes.forEach(function(b){b.pane===this&&(b.pane=null,b.update({},g))},this)};return g}();d.prototype.getHoverPane=function(b){var g=this,n;b&&g.pane.forEach(function(q){var m=b.chartX-g.plotLeft,a=b.chartY-g.plotTop;t(g.inverted?a:m,g.inverted?m:a,q.center)&&(n=q)});return n};p(d,"afterIsInsidePlot",function(b){this.polar&&(b.isInsidePlot=this.pane.some(function(g){return t(b.x,b.y,g.center)}))});p(a,"beforeGetHoverData",function(b){var g=this.chart;g.polar?(g.hoverPane=g.getHoverPane(b),
|
||||
b.filter=function(n){return n.visible&&!(!b.shared&&n.directTouch)&&w(n.options.enableMouseTracking,!0)&&(!g.hoverPane||n.xAxis.pane===g.hoverPane)}):g.hoverPane=void 0});p(a,"afterGetHoverData",function(b){var g=this.chart;b.hoverPoint&&b.hoverPoint.plotX&&b.hoverPoint.plotY&&g.hoverPane&&!t(b.hoverPoint.plotX,b.hoverPoint.plotY,g.hoverPane.center)&&(b.hoverPoint=void 0)});l.Pane=c;return l.Pane});A(d,"Core/Axis/RadialAxis.js",[d["Core/Axis/AxisDefaults.js"],d["Core/DefaultOptions.js"],d["Core/Globals.js"],
|
||||
d["Core/Utilities.js"]],function(d,e,l,a){var c=e.defaultOptions,t=l.noop,p=a.addEvent,k=a.correctFloat,x=a.defined,w=a.extend,b=a.fireEvent,g=a.merge,m=a.pick,n=a.relativeLength,q=a.wrap,H;(function(a){function e(){this.autoConnect=this.isCircular&&"undefined"===typeof m(this.userMax,this.options.max)&&k(this.endAngleRad-this.startAngleRad)===k(2*Math.PI);!this.isCircular&&this.chart.inverted&&this.max++;this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)}
|
||||
function y(){var h=this;return function(){if(h.isRadial&&h.tickPositions&&h.options.labels&&!0!==h.options.labels.allowOverlap)return h.tickPositions.map(function(f){return h.ticks[f]&&h.ticks[f].label}).filter(function(h){return!!h})}}function z(){return t}function f(h,f,b){var r=this.pane.center,u=h.value;if(this.isCircular){if(x(u))h.point&&(g=h.point.shapeArgs||{},g.start&&(u=this.chart.inverted?this.translate(h.point.rectPlotY,!0):h.point.x));else{var g=h.chartX||0;var v=h.chartY||0;u=this.translate(Math.atan2(v-
|
||||
b,g-f)-this.startAngleRad,!0)}h=this.getPosition(u);g=h.x;v=h.y}else x(u)||(g=h.chartX,v=h.chartY),x(g)&&x(v)&&(b=r[1]+this.chart.plotTop,u=this.translate(Math.min(Math.sqrt(Math.pow(g-f,2)+Math.pow(v-b,2)),r[2]/2)-r[3]/2,!0));return[u,g||0,v||0]}function h(h,f,b){h=this.pane.center;var r=this.chart,u=this.left||0,g=this.top||0,v=m(f,h[2]/2-this.offset);"undefined"===typeof b&&(b=this.horiz?0:this.center&&-this.center[3]/2);b&&(v+=b);this.isCircular||"undefined"!==typeof f?(f=this.chart.renderer.symbols.arc(u+
|
||||
h[0],g+h[1],v,v,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0}),f.xBounds=[u+h[0]],f.yBounds=[g+h[1]-v]):(f=this.postTranslate(this.angleRad,v),f=[["M",this.center[0]+r.plotLeft,this.center[1]+r.plotTop],["L",f.x,f.y]]);return f}function u(){this.constructor.prototype.getOffset.call(this);this.chart.axisOffset[this.side]=0}function r(h,f,b){var r=this.chart,u=function(h){if("string"===typeof h){var f=parseInt(h,10);y.test(h)&&(f=f*B/100);return f}return h},g=this.center,v=this.startAngleRad,
|
||||
B=g[2]/2,n=Math.min(this.offset,0),q=this.left||0,a=this.top||0,y=/%$/,z=this.isCircular,c=m(u(b.outerRadius),B),k=u(b.innerRadius);u=m(u(b.thickness),10);if("polygon"===this.options.gridLineInterpolation)n=this.getPlotLinePath({value:h}).concat(this.getPlotLinePath({value:f,reverse:!0}));else{h=Math.max(h,this.min);f=Math.min(f,this.max);h=this.translate(h);f=this.translate(f);z||(c=h||0,k=f||0);if("circle"!==b.shape&&z)b=v+(h||0),v+=f||0;else{b=-Math.PI/2;v=1.5*Math.PI;var E=!0}c-=n;n=r.renderer.symbols.arc(q+
|
||||
g[0],a+g[1],c,c,{start:Math.min(b,v),end:Math.max(b,v),innerR:m(k,c-(u-n)),open:E});z&&(z=(v+b)/2,q=q+g[0]+g[2]/2*Math.cos(z),n.xBounds=z>-Math.PI/2&&z<Math.PI/2?[q,r.plotWidth]:[0,q],n.yBounds=[a+g[1]+g[2]/2*Math.sin(z)],n.yBounds[0]+=z>-Math.PI&&0>z||z>Math.PI?-10:10)}return n}function B(h){var f=this,b=this.pane.center,r=this.chart,u=r.inverted,g=h.reverse,v=this.pane.options.background?this.pane.options.background[0]||this.pane.options.background:{},B=v.innerRadius||"0%",q=v.outerRadius||"100%",
|
||||
a=b[0]+r.plotLeft,z=b[1]+r.plotTop,c=this.height,y=h.isCrosshair;v=b[3]/2;var m=h.value,k;var E=this.getPosition(m);var e=E.x;E=E.y;y&&(E=this.getCrosshairPosition(h,a,z),m=E[0],e=E[1],E=E[2]);if(this.isCircular)m=Math.sqrt(Math.pow(e-a,2)+Math.pow(E-z,2)),g="string"===typeof B?n(B,1):B/m,r="string"===typeof q?n(q,1):q/m,b&&v&&(v/=m,g<v&&(g=v),r<v&&(r=v)),b=[["M",a+g*(e-a),z-g*(z-E)],["L",e-(1-r)*(e-a),E+(1-r)*(z-E)]];else if((m=this.translate(m))&&(0>m||m>c)&&(m=0),"circle"===this.options.gridLineInterpolation)b=
|
||||
this.getLinePath(0,m,v);else if(b=[],r[u?"yAxis":"xAxis"].forEach(function(h){h.pane===f.pane&&(k=h)}),k)for(a=k.tickPositions,k.autoConnect&&(a=a.concat([a[0]])),g&&(a=a.slice().reverse()),m&&(m+=v),z=0;z<a.length;z++)v=k.getPosition(a[z],m),b.push(z?["L",v.x,v.y]:["M",v.x,v.y]);return b}function v(h,f){h=this.translate(h);return this.postTranslate(this.isCircular?h:this.angleRad,m(this.isCircular?f:0>h?0:h,this.center[2]/2)-this.offset)}function E(){var h=this.center,f=this.chart,b=this.options.title;
|
||||
return{x:f.plotLeft+h[0]+(b.x||0),y:f.plotTop+h[1]-{high:.5,middle:.25,low:0}[b.align]*h[2]+(b.y||0)}}function l(b){b.beforeSetTickPositions=e;b.createLabelCollector=y;b.getCrosshairPosition=f;b.getLinePath=h;b.getOffset=u;b.getPlotBandPath=r;b.getPlotLinePath=B;b.getPosition=v;b.getTitlePosition=E;b.postTranslate=O;b.setAxisSize=A;b.setAxisTranslation=P;b.setOptions=Q}function L(){var h=this.chart,f=this.options,b=this.pane,r=b&&b.options;h.angular&&this.isXAxis||!b||!h.angular&&!h.polar||(this.angleRad=
|
||||
(f.angle||0)*Math.PI/180,this.startAngleRad=(r.startAngle-90)*Math.PI/180,this.endAngleRad=(m(r.endAngle,r.startAngle+360)-90)*Math.PI/180,this.offset=f.offset||0)}function H(h){this.isRadial&&(h.align=void 0,h.preventDefault())}function K(){if(this.chart&&this.chart.labelCollectors){var h=this.labelCollector?this.chart.labelCollectors.indexOf(this.labelCollector):-1;0<=h&&this.chart.labelCollectors.splice(h,1)}}function C(h){var f=this.chart,b=f.inverted,r=f.angular,u=f.polar,v=this.isXAxis,B=this.coll,
|
||||
n=r&&v,a=f.options;h=h.userOptions.pane||0;h=this.pane=f.pane&&f.pane[h];var q;if("colorAxis"===B)this.isRadial=!1;else{if(r){if(n?(this.isHidden=!0,this.createLabelCollector=z,this.getOffset=t,this.render=this.redraw=G,this.setTitle=this.setCategories=this.setScale=t):l(this),q=!v)this.defaultPolarOptions=R}else u&&(l(this),this.defaultPolarOptions=(q=this.horiz)?S:g("xAxis"===B?d.defaultXAxisOptions:d.defaultYAxisOptions,T),b&&"yAxis"===B&&(this.defaultPolarOptions.stackLabels=d.defaultYAxisOptions.stackLabels,
|
||||
this.defaultPolarOptions.reversedStacks=!0));r||u?(this.isRadial=!0,a.chart.zoomType=null,this.labelCollector||(this.labelCollector=this.createLabelCollector()),this.labelCollector&&f.labelCollectors.push(this.labelCollector)):this.isRadial=!1;h&&q&&(h.axis=this);this.isCircular=q}}function U(){this.isRadial&&this.beforeSetTickPositions()}function J(h){var f=this.label;if(f){var b=this.axis,r=f.getBBox(),u=b.options.labels,v=(b.translate(this.pos)+b.startAngleRad+Math.PI/2)/Math.PI*180%360,g=Math.round(v),
|
||||
B=x(u.y)?0:.3*-r.height,a=u.y,q=20,z=u.align,c="end",y=0>g?g+360:g,E=y,k=0,e=0;if(b.isRadial){var l=b.getPosition(this.pos,b.center[2]/2+n(m(u.distance,-25),b.center[2]/2,-b.center[2]/2));"auto"===u.rotation?f.attr({rotation:v}):x(a)||(a=b.chart.renderer.fontMetrics(f.styles&&f.styles.fontSize).b-r.height/2);x(z)||(b.isCircular?(r.width>b.len*b.tickInterval/(b.max-b.min)&&(q=0),z=v>q&&v<180-q?"left":v>180+q&&v<360-q?"right":"center"):z="center",f.attr({align:z}));if("auto"===z&&2===b.tickPositions.length&&
|
||||
b.isCircular){90<y&&180>y?y=180-y:270<y&&360>=y&&(y=540-y);180<E&&360>=E&&(E=360-E);if(b.pane.options.startAngle===g||b.pane.options.startAngle===g+360||b.pane.options.startAngle===g-360)c="start";z=-90<=g&&90>=g||-360<=g&&-270>=g||270<=g&&360>=g?"start"===c?"right":"left":"start"===c?"left":"right";70<E&&110>E&&(z="center");15>y||180<=y&&195>y?k=.3*r.height:15<=y&&35>=y?k="start"===c?0:.75*r.height:195<=y&&215>=y?k="start"===c?.75*r.height:0:35<y&&90>=y?k="start"===c?.25*-r.height:r.height:215<y&&
|
||||
270>=y&&(k="start"===c?r.height:.25*-r.height);15>E?e="start"===c?.15*-r.height:.15*r.height:165<E&&180>=E&&(e="start"===c?.15*r.height:.15*-r.height);f.attr({align:z});f.translate(e,k+B)}h.pos.x=l.x+(u.x||0);h.pos.y=l.y+(a||0)}}}function V(h){this.axis.getPosition&&w(h.pos,this.axis.getPosition(this.pos))}function O(h,f){var b=this.chart,r=this.center;h=this.startAngleRad+h;return{x:b.plotLeft+r[0]+Math.cos(h)*f,y:b.plotTop+r[1]+Math.sin(h)*f}}function G(){this.isDirty=!1}function A(){this.constructor.prototype.setAxisSize.call(this);
|
||||
if(this.isRadial){this.pane.updateCenter(this);var h=this.center=this.pane.center.slice();if(this.isCircular)this.sector=this.endAngleRad-this.startAngleRad;else{var f=this.postTranslate(this.angleRad,h[3]/2);h[0]=f.x-this.chart.plotLeft;h[1]=f.y-this.chart.plotTop}this.len=this.width=this.height=(h[2]-h[3])*m(this.sector,1)/2}}function P(){this.constructor.prototype.setAxisTranslation.call(this);this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):
|
||||
(this.center[2]-this.center[3])/2/(this.max-this.min||1),this.minPixelPadding=this.isXAxis?this.transA*this.minPointOffset:0)}function Q(h){h=this.options=g(this.constructor.defaultOptions,this.defaultPolarOptions,c[this.coll],h);h.plotBands||(h.plotBands=[]);b(this,"afterSetOptions")}function W(h,f,b,r,u,g,v){var B=this.axis;B.isRadial?(h=B.getPosition(this.pos,B.center[2]/2+r),f=["M",f,b,"L",h.x,h.y]):f=h.call(this,f,b,r,u,g,v);return f}var N=[],S={gridLineWidth:1,labels:{align:void 0,distance:15,
|
||||
x:0,y:void 0,style:{textOverflow:"none"}},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},R={labels:{align:"center",x:0,y:void 0},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},T={gridLineInterpolation:"circle",gridLineWidth:1,labels:{align:"right",x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}};a.compose=function(h,f){-1===N.indexOf(h)&&
|
||||
(N.push(h),p(h,"afterInit",L),p(h,"autoLabelAlign",H),p(h,"destroy",K),p(h,"init",C),p(h,"initialAxisTranslation",U));-1===N.indexOf(f)&&(N.push(f),p(f,"afterGetLabelPosition",J),p(f,"afterGetPosition",V),q(f.prototype,"getMarkPath",W));return h}})(H||(H={}));return H});A(d,"Series/AreaRange/AreaRangePoint.js",[d["Series/Area/AreaSeries.js"],d["Core/Series/Point.js"],d["Core/Utilities.js"]],function(d,e,l){var a=this&&this.__extends||function(){var a=function(c,k){a=Object.setPrototypeOf||{__proto__:[]}instanceof
|
||||
Array&&function(b,g){b.__proto__=g}||function(b,g){for(var a in g)g.hasOwnProperty(a)&&(b[a]=g[a])};return a(c,k)};return function(c,k){function b(){this.constructor=c}a(c,k);c.prototype=null===k?Object.create(k):(b.prototype=k.prototype,new b)}}(),c=e.prototype,t=l.defined,p=l.isNumber;return function(k){function e(){var a=null!==k&&k.apply(this,arguments)||this;a.high=void 0;a.low=void 0;a.options=void 0;a.plotHigh=void 0;a.plotLow=void 0;a.plotHighX=void 0;a.plotLowX=void 0;a.plotX=void 0;a.series=
|
||||
void 0;return a}a(e,k);e.prototype.setState=function(){var a=this.state,b=this.series,g=b.chart.polar;t(this.plotHigh)||(this.plotHigh=b.yAxis.toPixels(this.high,!0));t(this.plotLow)||(this.plotLow=this.plotY=b.yAxis.toPixels(this.low,!0));b.stateMarkerGraphic&&(b.lowerStateMarkerGraphic=b.stateMarkerGraphic,b.stateMarkerGraphic=b.upperStateMarkerGraphic);this.graphic=this.upperGraphic;this.plotY=this.plotHigh;g&&(this.plotX=this.plotHighX);c.setState.apply(this,arguments);this.state=a;this.plotY=
|
||||
this.plotLow;this.graphic=this.lowerGraphic;g&&(this.plotX=this.plotLowX);b.stateMarkerGraphic&&(b.upperStateMarkerGraphic=b.stateMarkerGraphic,b.stateMarkerGraphic=b.lowerStateMarkerGraphic,b.lowerStateMarkerGraphic=void 0);c.setState.apply(this,arguments)};e.prototype.haloPath=function(){var a=this.series.chart.polar,b=[];this.plotY=this.plotLow;a&&(this.plotX=this.plotLowX);this.isInside&&(b=c.haloPath.apply(this,arguments));this.plotY=this.plotHigh;a&&(this.plotX=this.plotHighX);this.isTopInside&&
|
||||
(b=b.concat(c.haloPath.apply(this,arguments)));return b};e.prototype.isValid=function(){return p(this.low)&&p(this.high)};return e}(d.prototype.pointClass)});A(d,"Series/AreaRange/AreaRangeSeries.js",[d["Series/AreaRange/AreaRangePoint.js"],d["Series/Area/AreaSeries.js"],d["Series/Column/ColumnSeries.js"],d["Core/Globals.js"],d["Core/Series/Series.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l,a,c,t,p){var k=this&&this.__extends||function(){var b=function(g,a){b=Object.setPrototypeOf||
|
||||
{__proto__:[]}instanceof Array&&function(b,f){b.__proto__=f}||function(b,f){for(var h in f)f.hasOwnProperty(h)&&(b[h]=f[h])};return b(g,a)};return function(g,a){function n(){this.constructor=g}b(g,a);g.prototype=null===a?Object.create(a):(n.prototype=a.prototype,new n)}}(),x=e.prototype,w=l.prototype;l=a.noop;var b=c.prototype,g=p.defined,m=p.extend,n=p.isArray,q=p.pick,H=p.merge;c=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;
|
||||
b.lowerStateMarkerGraphic=void 0;b.xAxis=void 0;return b}k(c,a);c.prototype.toYData=function(b){return[b.low,b.high]};c.prototype.highToXY=function(b){var g=this.chart,f=this.xAxis.postTranslate(b.rectPlotX||0,this.yAxis.len-b.plotHigh);b.plotHighX=f.x-g.plotLeft;b.plotHigh=f.y-g.plotTop;b.plotLowX=b.plotX};c.prototype.translate=function(){var b=this,g=b.yAxis;x.translate.apply(b);b.points.forEach(function(f){var h=f.high,u=f.plotY;f.isNull?f.plotY=null:(f.plotLow=u,f.plotHigh=g.translate(b.dataModify?
|
||||
b.dataModify.modifyValue(h):h,0,1,0,1),b.dataModify&&(f.yBottom=f.plotHigh))});this.chart.polar&&this.points.forEach(function(f){b.highToXY(f);f.tooltipPos=[(f.plotHighX+f.plotLowX)/2,(f.plotHigh+f.plotLow)/2]})};c.prototype.getGraphPath=function(b){var g=[],f=[],h,u=x.getGraphPath;var r=this.options;var a=this.chart.polar,v=a&&!1!==r.connectEnds,n=r.connectNulls,c=r.step;b=b||this.points;for(h=b.length;h--;){var m=b[h];var k=a?{plotX:m.rectPlotX,plotY:m.yBottom,doCurve:!1}:{plotX:m.plotX,plotY:m.plotY,
|
||||
doCurve:!1};m.isNull||v||n||b[h+1]&&!b[h+1].isNull||f.push(k);var e={polarPlotY:m.polarPlotY,rectPlotX:m.rectPlotX,yBottom:m.yBottom,plotX:q(m.plotHighX,m.plotX),plotY:m.plotHigh,isNull:m.isNull};f.push(e);g.push(e);m.isNull||v||n||b[h-1]&&!b[h-1].isNull||f.push(k)}b=u.call(this,b);c&&(!0===c&&(c="left"),r.step={left:"right",center:"center",right:"left"}[c]);g=u.call(this,g);f=u.call(this,f);r.step=c;r=[].concat(b,g);!this.chart.polar&&f[0]&&"M"===f[0][0]&&(f[0]=["L",f[0][1],f[0][2]]);this.graphPath=
|
||||
r;this.areaPath=b.concat(f);r.isArea=!0;r.xMap=b.xMap;this.areaPath.xMap=b.xMap;return r};c.prototype.drawDataLabels=function(){var g=this.points,a=g.length,f,h=[],u=this.options.dataLabels,r,B=this.chart.inverted;if(u){if(n(u)){var v=u[0]||{enabled:!1};var c=u[1]||{enabled:!1}}else v=m({},u),v.x=u.xHigh,v.y=u.yHigh,c=m({},u),c.x=u.xLow,c.y=u.yLow;if(v.enabled||this._hasPointLabels){for(f=a;f--;)if(r=g[f]){var q=v.inside?r.plotHigh<r.plotLow:r.plotHigh>r.plotLow;r.y=r.high;r._plotY=r.plotY;r.plotY=
|
||||
r.plotHigh;h[f]=r.dataLabel;r.dataLabel=r.dataLabelUpper;r.below=q;B?v.align||(v.align=q?"right":"left"):v.verticalAlign||(v.verticalAlign=q?"top":"bottom")}this.options.dataLabels=v;b.drawDataLabels&&b.drawDataLabels.apply(this,arguments);for(f=a;f--;)if(r=g[f])r.dataLabelUpper=r.dataLabel,r.dataLabel=h[f],delete r.dataLabels,r.y=r.low,r.plotY=r._plotY}if(c.enabled||this._hasPointLabels){for(f=a;f--;)if(r=g[f])q=c.inside?r.plotHigh<r.plotLow:r.plotHigh>r.plotLow,r.below=!q,B?c.align||(c.align=q?
|
||||
"left":"right"):c.verticalAlign||(c.verticalAlign=q?"bottom":"top");this.options.dataLabels=c;b.drawDataLabels&&b.drawDataLabels.apply(this,arguments)}if(v.enabled)for(f=a;f--;)if(r=g[f])r.dataLabels=[r.dataLabelUpper,r.dataLabel].filter(function(h){return!!h});this.options.dataLabels=u}};c.prototype.alignDataLabel=function(){w.alignDataLabel.apply(this,arguments)};c.prototype.drawPoints=function(){var a=this.points.length,c;b.drawPoints.apply(this,arguments);for(c=0;c<a;){var f=this.points[c];f.origProps=
|
||||
{plotY:f.plotY,plotX:f.plotX,isInside:f.isInside,negative:f.negative,zone:f.zone,y:f.y};f.lowerGraphic=f.graphic;f.graphic=f.upperGraphic;f.plotY=f.plotHigh;g(f.plotHighX)&&(f.plotX=f.plotHighX);f.y=q(f.high,f.origProps.y);f.negative=f.y<(this.options.threshold||0);this.zones.length&&(f.zone=f.getZone());this.chart.polar||(f.isInside=f.isTopInside="undefined"!==typeof f.plotY&&0<=f.plotY&&f.plotY<=this.yAxis.len&&0<=f.plotX&&f.plotX<=this.xAxis.len);c++}b.drawPoints.apply(this,arguments);for(c=0;c<
|
||||
a;)f=this.points[c],f.upperGraphic=f.graphic,f.graphic=f.lowerGraphic,f.origProps&&(m(f,f.origProps),delete f.origProps),c++};c.defaultOptions=H(e.defaultOptions,{lineWidth:1,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{align:void 0,verticalAlign:void 0,xLow:0,xHigh:0,yLow:0,yHigh:0}});return c}(e);m(c.prototype,{pointArrayMap:["low","high"],pointValKey:"low",deferTranslatePolar:!0,
|
||||
pointClass:d,setStackedPoints:l});t.registerSeriesType("arearange",c);"";return c});A(d,"Series/AreaSplineRange/AreaSplineRangeSeries.js",[d["Series/AreaRange/AreaRangeSeries.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l){var a=this&&this.__extends||function(){var a=function(c,k){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,g){b.__proto__=g}||function(b,g){for(var a in g)g.hasOwnProperty(a)&&(b[a]=g[a])};return a(c,k)};return function(c,k){function b(){this.constructor=
|
||||
c}a(c,k);c.prototype=null===k?Object.create(k):(b.prototype=k.prototype,new b)}}(),c=e.seriesTypes.spline,t=l.merge;l=l.extend;var p=function(c){function k(){var a=null!==c&&c.apply(this,arguments)||this;a.options=void 0;a.data=void 0;a.points=void 0;return a}a(k,c);k.defaultOptions=t(d.defaultOptions);return k}(d);l(p.prototype,{getPointSpline:c.prototype.getPointSpline});e.registerSeriesType("areasplinerange",p);"";return p});A(d,"Series/BoxPlot/BoxPlotSeries.js",[d["Series/Column/ColumnSeries.js"],
|
||||
d["Core/Globals.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l,a){var c=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var g in a)a.hasOwnProperty(g)&&(b[g]=a[g])};return a(c,b)};return function(c,b){function g(){this.constructor=c}a(c,b);c.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)}}();e=e.noop;var t=a.extend,p=a.merge,k=a.pick;a=
|
||||
function(a){function e(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}c(e,a);e.prototype.pointAttribs=function(){return{}};e.prototype.translate=function(){var b=this.yAxis,g=this.pointArrayMap;a.prototype.translate.apply(this);this.points.forEach(function(a){g.forEach(function(g){null!==a[g]&&(a[g+"Plot"]=b.translate(a[g],0,1,0,1))});a.plotHigh=a.highPlot})};e.prototype.drawPoints=function(){var b=this,g=b.options,a=b.chart,c=a.renderer,q,
|
||||
e,l,d,y,z,f=0,h,u,r,B,v=!1!==b.doQuartiles,E,p=b.options.whiskerLength;b.points.forEach(function(n){var m=n.graphic,H=m?"animate":"attr",t=n.shapeArgs,x={},I={},w={},L={},M=n.color||b.color;"undefined"!==typeof n.plotY&&(h=Math.round(t.width),u=Math.floor(t.x),r=u+h,B=Math.round(h/2),q=Math.floor(v?n.q1Plot:n.lowPlot),e=Math.floor(v?n.q3Plot:n.lowPlot),l=Math.floor(n.highPlot),d=Math.floor(n.lowPlot),m||(n.graphic=m=c.g("point").add(b.group),n.stem=c.path().addClass("highcharts-boxplot-stem").add(m),
|
||||
p&&(n.whiskers=c.path().addClass("highcharts-boxplot-whisker").add(m)),v&&(n.box=c.path(void 0).addClass("highcharts-boxplot-box").add(m)),n.medianShape=c.path(void 0).addClass("highcharts-boxplot-median").add(m)),a.styledMode||(I.stroke=n.stemColor||g.stemColor||M,I["stroke-width"]=k(n.stemWidth,g.stemWidth,g.lineWidth),I.dashstyle=n.stemDashStyle||g.stemDashStyle||g.dashStyle,n.stem.attr(I),p&&(w.stroke=n.whiskerColor||g.whiskerColor||M,w["stroke-width"]=k(n.whiskerWidth,g.whiskerWidth,g.lineWidth),
|
||||
w.dashstyle=n.whiskerDashStyle||g.whiskerDashStyle||g.dashStyle,n.whiskers.attr(w)),v&&(x.fill=n.fillColor||g.fillColor||M,x.stroke=g.lineColor||M,x["stroke-width"]=g.lineWidth||0,x.dashstyle=n.boxDashStyle||g.boxDashStyle||g.dashStyle,n.box.attr(x)),L.stroke=n.medianColor||g.medianColor||M,L["stroke-width"]=k(n.medianWidth,g.medianWidth,g.lineWidth),L.dashstyle=n.medianDashStyle||g.medianDashStyle||g.dashStyle,n.medianShape.attr(L)),z=n.stem.strokeWidth()%2/2,f=u+B+z,m=[["M",f,e],["L",f,l],["M",
|
||||
f,q],["L",f,d]],n.stem[H]({d:m}),v&&(z=n.box.strokeWidth()%2/2,q=Math.floor(q)+z,e=Math.floor(e)+z,u+=z,r+=z,m=[["M",u,e],["L",u,q],["L",r,q],["L",r,e],["L",u,e],["Z"]],n.box[H]({d:m})),p&&(z=n.whiskers.strokeWidth()%2/2,l+=z,d+=z,E=/%$/.test(p)?B*parseFloat(p)/100:p/2,m=[["M",f-E,l],["L",f+E,l],["M",f-E,d],["L",f+E,d]],n.whiskers[H]({d:m})),y=Math.round(n.medianPlot),z=n.medianShape.strokeWidth()%2/2,y+=z,m=[["M",u,y],["L",r,y]],n.medianShape[H]({d:m}))})};e.prototype.toYData=function(b){return[b.low,
|
||||
b.q1,b.median,b.q3,b.high]};e.defaultOptions=p(d.defaultOptions,{threshold:null,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},whiskerLength:"50%",fillColor:"#ffffff",lineWidth:1,medianWidth:2,whiskerWidth:2});return e}(d);t(a.prototype,{pointArrayMap:["low","q1","median","q3","high"],pointValKey:"high",drawDataLabels:e,
|
||||
setStackedPoints:e});l.registerSeriesType("boxplot",a);"";return a});A(d,"Series/Bubble/BubbleLegendDefaults.js",[],function(){return{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:"10px",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,
|
||||
color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}});A(d,"Series/Bubble/BubbleLegendItem.js",[d["Core/Color/Color.js"],d["Core/FormatUtilities.js"],d["Core/Globals.js"],d["Core/Utilities.js"]],function(d,e,l,a){var c=d.parse,t=l.noop,p=a.arrayMax,k=a.arrayMin,x=a.isNumber,w=a.merge,b=a.pick,g=a.stableSort;"";return function(){function a(b,a){this.options=this.symbols=this.visible=this.selected=this.ranges=this.movementX=this.maxLabel=this.legendSymbol=
|
||||
this.legendItemWidth=this.legendItemHeight=this.legendItem=this.legendGroup=this.legend=this.fontMetrics=this.chart=void 0;this.setState=t;this.init(b,a)}a.prototype.init=function(b,a){this.options=b;this.visible=!0;this.chart=a.chart;this.legend=a};a.prototype.addToLegend=function(b){b.splice(this.options.legendIndex,0,this)};a.prototype.drawLegendSymbol=function(a){var c=this.chart,n=this.options,e=b(a.options.itemDistance,20),k=n.ranges,m=n.connectorDistance;this.fontMetrics=c.renderer.fontMetrics(n.labels.style.fontSize);
|
||||
k&&k.length&&x(k[0].value)?(g(k,function(b,f){return f.value-b.value}),this.ranges=k,this.setOptions(),this.render(),a=this.getMaxLabelSize(),k=this.ranges[0].radius,c=2*k,m=m-k+a.width,m=0<m?m:0,this.maxLabel=a,this.movementX="left"===n.labels.align?m:0,this.legendItemWidth=c+m+e,this.legendItemHeight=c+this.fontMetrics.h/2):a.options.bubbleLegend.autoRanges=!0};a.prototype.setOptions=function(){var a=this.ranges,g=this.options,k=this.chart.series[g.seriesIndex],e=this.legend.baseline,m={zIndex:g.zIndex,
|
||||
"stroke-width":g.borderWidth},l={zIndex:g.zIndex,"stroke-width":g.connectorWidth},z={align:this.legend.options.rtl||"left"===g.labels.align?"right":"left",zIndex:g.zIndex},f=k.options.marker.fillOpacity,h=this.chart.styledMode;a.forEach(function(u,r){h||(m.stroke=b(u.borderColor,g.borderColor,k.color),m.fill=b(u.color,g.color,1!==f?c(k.color).setOpacity(f).get("rgba"):k.color),l.stroke=b(u.connectorColor,g.connectorColor,k.color));a[r].radius=this.getRangeRadius(u.value);a[r]=w(a[r],{center:a[0].radius-
|
||||
a[r].radius+e});h||w(!0,a[r],{bubbleAttribs:w(m),connectorAttribs:w(l),labelAttribs:z})},this)};a.prototype.getRangeRadius=function(b){var a=this.options;return this.chart.series[this.options.seriesIndex].getRadius.call(this,a.ranges[a.ranges.length-1].value,a.ranges[0].value,a.minSize,a.maxSize,b)};a.prototype.render=function(){var b=this.chart.renderer,a=this.options.zThreshold;this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]});this.legendSymbol=b.g("bubble-legend");this.legendItem=
|
||||
b.g("bubble-legend-item");this.legendSymbol.translateX=0;this.legendSymbol.translateY=0;this.ranges.forEach(function(b){b.value>=a&&this.renderRange(b)},this);this.legendSymbol.add(this.legendItem);this.legendItem.add(this.legendGroup);this.hideOverlappingLabels()};a.prototype.renderRange=function(b){var a=this.options,g=a.labels,c=this.chart,n=c.series[a.seriesIndex],k=c.renderer,e=this.symbols;c=e.labels;var f=b.center,h=Math.abs(b.radius),u=a.connectorDistance||0,r=g.align,B=a.connectorWidth,v=
|
||||
this.ranges[0].radius||0,m=f-h-a.borderWidth/2+B/2,l=this.fontMetrics;l=l.f/2-(l.h-l.f)/2;var d=k.styledMode;u=this.legend.options.rtl||"left"===r?-u:u;"center"===r&&(u=0,a.connectorDistance=0,b.labelAttribs.align="center");r=m+a.labels.y;var p=v+u+a.labels.x;e.bubbleItems.push(k.circle(v,f+((m%1?1:.5)-(B%2?0:.5)),h).attr(d?{}:b.bubbleAttribs).addClass((d?"highcharts-color-"+n.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(a.className||"")).add(this.legendSymbol));e.connectors.push(k.path(k.crispLine([["M",
|
||||
v,m],["L",v+u,m]],a.connectorWidth)).attr(d?{}:b.connectorAttribs).addClass((d?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(a.connectorClassName||"")).add(this.legendSymbol));b=k.text(this.formatLabel(b),p,r+l).attr(d?{}:b.labelAttribs).css(d?{}:g.style).addClass("highcharts-bubble-legend-labels "+(a.labels.className||"")).add(this.legendSymbol);c.push(b);b.placed=!0;b.alignAttr={x:p,y:r+l}};a.prototype.getMaxLabelSize=function(){var b,a;this.symbols.labels.forEach(function(g){a=
|
||||
g.getBBox(!0);b=b?a.width>b.width?a:b:a});return b||{}};a.prototype.formatLabel=function(b){var a=this.options,g=a.labels.formatter;a=a.labels.format;var c=this.chart.numberFormatter;return a?e.format(a,b):g?g.call(b):c(b.value,1)};a.prototype.hideOverlappingLabels=function(){var b=this.chart,a=this.symbols;!this.options.labels.allowOverlap&&a&&(b.hideOverlappingLabels(a.labels),a.labels.forEach(function(b,g){b.newOpacity?b.newOpacity!==b.oldOpacity&&a.connectors[g].show():a.connectors[g].hide()}))};
|
||||
a.prototype.getRanges=function(){var a=this.legend.bubbleLegend,g=a.options.ranges,c,e=Number.MAX_VALUE,m=-Number.MAX_VALUE;a.chart.series.forEach(function(a){a.isBubble&&!a.ignoreSeries&&(c=a.zData.filter(x),c.length&&(e=b(a.options.zMin,Math.min(e,Math.max(k(c),!1===a.options.displayNegative?a.options.zThreshold:-Number.MAX_VALUE))),m=b(a.options.zMax,Math.max(m,p(c)))))});var l=e===m?[{value:m}]:[{value:e},{value:(e+m)/2},{value:m,autoRanges:!0}];g.length&&g[0].radius&&l.reverse();l.forEach(function(b,
|
||||
f){g&&g[f]&&(l[f]=w(g[f],b))});return l};a.prototype.predictBubbleSizes=function(){var b=this.chart,a=this.fontMetrics,g=b.legend.options,c=g.floating,k=(g="horizontal"===g.layout)?b.legend.lastLineHeight:0,e=b.plotSizeX,m=b.plotSizeY,f=b.series[this.options.seriesIndex],h=f.getPxExtremes();b=Math.ceil(h.minPxSize);h=Math.ceil(h.maxPxSize);var u=Math.min(m,e);f=f.options.maxSize;if(c||!/%$/.test(f))a=h;else if(f=parseFloat(f),a=(u+k-a.h/2)*f/100/(f/100+1),g&&m-a>=e||!g&&e-a>=m)a=h;return[b,Math.ceil(a)]};
|
||||
a.prototype.updateRanges=function(b,a){var g=this.legend.options.bubbleLegend;g.minSize=b;g.maxSize=a;g.ranges=this.getRanges()};a.prototype.correctSizes=function(){var b=this.legend,a=this.chart.series[this.options.seriesIndex].getPxExtremes();1<Math.abs(Math.ceil(a.maxPxSize)-this.options.maxSize)&&(this.updateRanges(this.options.minSize,a.maxPxSize),b.render())};return a}()});A(d,"Series/Bubble/BubbleLegendComposition.js",[d["Series/Bubble/BubbleLegendDefaults.js"],d["Series/Bubble/BubbleLegendItem.js"],
|
||||
d["Core/DefaultOptions.js"],d["Core/Utilities.js"]],function(d,e,l,a){var c=l.setOptions,t=a.addEvent,p=a.objectEach,k=a.wrap,x;(function(a){function b(b,a,c){var f=this.legend,h=0<=g(this);if(f&&f.options.enabled&&f.bubbleLegend&&f.options.bubbleLegend.autoRanges&&h){var u=f.bubbleLegend.options;h=f.bubbleLegend.predictBubbleSizes();f.bubbleLegend.updateRanges(h[0],h[1]);u.placed||(f.group.placed=!1,f.allItems.forEach(function(h){h.legendGroup.translateY=null}));f.render();this.getMargins();this.axes.forEach(function(h){h.visible&&
|
||||
h.render();u.placed||(h.setScale(),h.updateNames(),p(h.ticks,function(h){h.isNew=!0;h.isNewLabel=!0}))});u.placed=!0;this.getMargins();b.call(this,a,c);f.bubbleLegend.correctSizes();x(f,m(f))}else b.call(this,a,c),f&&f.options.enabled&&f.bubbleLegend&&(f.render(),x(f,m(f)))}function g(b){b=b.series;for(var a=0;a<b.length;){if(b[a]&&b[a].isBubble&&b[a].visible&&b[a].zData.length)return a;a++}return-1}function m(b){b=b.allItems;var a=[],g=b.length,f,h=0;for(f=0;f<g;f++)if(b[f].legendItemHeight&&(b[f].itemHeight=
|
||||
b[f].legendItemHeight),b[f]===b[g-1]||b[f+1]&&b[f]._legendItemPos[1]!==b[f+1]._legendItemPos[1]){a.push({height:0});var u=a[a.length-1];for(h;h<=f;h++)b[h].itemHeight>u.height&&(u.height=b[h].itemHeight);u.step=f}return a}function n(b){var a=this.bubbleLegend,c=this.options,f=c.bubbleLegend,h=g(this.chart);a&&a.ranges&&a.ranges.length&&(f.ranges.length&&(f.autoRanges=!!f.ranges[0].autoRanges),this.destroyItem(a));0<=h&&c.enabled&&f.enabled&&(f.seriesIndex=h,this.bubbleLegend=new e(f,this),this.bubbleLegend.addToLegend(b.allItems))}
|
||||
function l(){var b=this.chart,a=this.visible,c=this.chart.legend;c&&c.bubbleLegend&&(this.visible=!a,this.ignoreSeries=a,b=0<=g(b),c.bubbleLegend.visible!==b&&(c.update({bubbleLegend:{enabled:b}}),c.bubbleLegend.visible=b),this.visible=a)}function x(b,a){var g=b.options.rtl,f,h,u,r=0;b.allItems.forEach(function(b,c){f=b.legendGroup.translateX;h=b._legendItemPos[1];if((u=b.movementX)||g&&b.ranges)u=g?f-b.options.maxSize/2:f+u,b.legendGroup.attr({translateX:u});c>a[r].step&&r++;b.legendGroup.attr({translateY:Math.round(h+
|
||||
a[r].height/2)});b._legendItemPos[1]=h+a[r].height/2})}var w=[];a.compose=function(a,g,e){-1===w.indexOf(a)&&(w.push(a),c({legend:{bubbleLegend:d}}),k(a.prototype,"drawChartBox",b));-1===w.indexOf(g)&&(w.push(g),t(g,"afterGetAllItems",n));-1===w.indexOf(e)&&(w.push(e),t(e,"legendItemClick",l))}})(x||(x={}));return x});A(d,"Series/Bubble/BubblePoint.js",[d["Core/Series/Point.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l){var a=this&&this.__extends||function(){var a=
|
||||
function(c,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e])};return a(c,e)};return function(c,e){function k(){this.constructor=c}a(c,e);c.prototype=null===e?Object.create(e):(k.prototype=e.prototype,new k)}}();l=l.extend;e=function(c){function e(){var a=null!==c&&c.apply(this,arguments)||this;a.options=void 0;a.series=void 0;return a}a(e,c);e.prototype.haloPath=function(a){return d.prototype.haloPath.call(this,
|
||||
0===a?0:(this.marker?this.marker.radius||0:0)+a)};return e}(e.seriesTypes.scatter.prototype.pointClass);l(e.prototype,{ttBelow:!1});return e});A(d,"Series/Bubble/BubbleSeries.js",[d["Core/Axis/Axis.js"],d["Series/Bubble/BubbleLegendComposition.js"],d["Series/Bubble/BubblePoint.js"],d["Core/Color/Color.js"],d["Core/Globals.js"],d["Core/Series/Series.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l,a,c,t,p,k){var x=this&&this.__extends||function(){var b=function(f,h){b=
|
||||
Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,h){b.__proto__=h}||function(b,h){for(var f in h)h.hasOwnProperty(f)&&(b[f]=h[f])};return b(f,h)};return function(f,h){function a(){this.constructor=f}b(f,h);f.prototype=null===h?Object.create(h):(a.prototype=h.prototype,new a)}}(),w=a.parse;a=c.noop;var b=p.seriesTypes;c=b.column;var g=b.scatter;b=k.addEvent;var m=k.arrayMax,n=k.arrayMin,q=k.clamp,H=k.extend,K=k.isNumber,I=k.merge,y=k.pick;k=function(b){function f(){var h=null!==b&&
|
||||
b.apply(this,arguments)||this;h.data=void 0;h.maxPxSize=void 0;h.minPxSize=void 0;h.options=void 0;h.points=void 0;h.radii=void 0;h.yData=void 0;h.zData=void 0;return h}x(f,b);f.prototype.animate=function(b){!b&&this.points.length<this.options.animationLimit&&this.points.forEach(function(b){var h=b.graphic;h&&h.width&&(this.hasRendered||h.attr({x:b.plotX,y:b.plotY,width:1,height:1}),h.animate(this.markerAttribs(b),this.options.animation))},this)};f.prototype.getRadii=function(){var b=this,f=this.zData,
|
||||
a=this.yData,g=[],c=this.chart.bubbleZExtremes;var e=this.getPxExtremes();var m=e.minPxSize,k=e.maxPxSize;if(!c){var n=Number.MAX_VALUE,l=-Number.MAX_VALUE,d;this.chart.series.forEach(function(h){h.bubblePadding&&(h.visible||!b.chart.options.chart.ignoreHiddenSeries)&&(h=h.getZExtremes())&&(n=Math.min(n||h.zMin,h.zMin),l=Math.max(l||h.zMax,h.zMax),d=!0)});d?(c={zMin:n,zMax:l},this.chart.bubbleZExtremes=c):c={zMin:0,zMax:0}}var p=0;for(e=f.length;p<e;p++){var q=f[p];g.push(this.getRadius(c.zMin,c.zMax,
|
||||
m,k,q,a[p]))}this.radii=g};f.prototype.getRadius=function(b,f,a,g,c,e){var h=this.options,r="width"!==h.sizeBy,u=h.zThreshold,v=f-b,m=.5;if(null===e||null===c)return null;if(K(c)){h.sizeByAbsoluteValue&&(c=Math.abs(c-u),v=Math.max(f-u,Math.abs(b-u)),b=0);if(c<b)return a/2-1;0<v&&(m=(c-b)/v)}r&&0<=m&&(m=Math.sqrt(m));return Math.ceil(a+m*(g-a))/2};f.prototype.hasData=function(){return!!this.processedXData.length};f.prototype.pointAttribs=function(b,f){var h=this.options.marker.fillOpacity;b=t.prototype.pointAttribs.call(this,
|
||||
b,f);1!==h&&(b.fill=w(b.fill).setOpacity(h).get("rgba"));return b};f.prototype.translate=function(){b.prototype.translate.call(this);this.getRadii();this.translateBubble()};f.prototype.translateBubble=function(){for(var b=this.data,f=this.radii,a=this.getPxExtremes().minPxSize,g=b.length;g--;){var c=b[g],e=f?f[g]:0;K(e)&&e>=a/2?(c.marker=H(c.marker,{radius:e,width:2*e,height:2*e}),c.dlBox={x:c.plotX-e,y:c.plotY-e,width:2*e,height:2*e}):c.shapeArgs=c.plotY=c.dlBox=void 0}};f.prototype.getPxExtremes=
|
||||
function(){var b=Math.min(this.chart.plotWidth,this.chart.plotHeight),f=function(h){if("string"===typeof h){var f=/%$/.test(h);h=parseInt(h,10)}return f?b*h/100:h},a=f(y(this.options.minSize,8));f=Math.max(f(y(this.options.maxSize,"20%")),a);return{minPxSize:a,maxPxSize:f}};f.prototype.getZExtremes=function(){var b=this.options,f=(this.zData||[]).filter(K);if(f.length){var a=y(b.zMin,q(n(f),!1===b.displayNegative?b.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE));b=y(b.zMax,m(f));if(K(a)&&K(b))return{zMin:a,
|
||||
zMax:b}}};f.compose=e.compose;f.defaultOptions=I(g.defaultOptions,{dataLabels:{formatter:function(){var b=this.series.chart.numberFormatter,f=this.point.z;return K(f)?b(f,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,
|
||||
zoneAxis:"z"});return f}(g);H(k.prototype,{alignDataLabel:c.prototype.alignDataLabel,applyZones:a,bubblePadding:!0,buildKDTree:a,directTouch:!0,isBubble:!0,pointArrayMap:["y","z"],pointClass:l,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"});b(k,"updatedData",function(b){delete b.target.chart.bubbleZExtremes});d.prototype.beforePadding=function(){var b=this,f=this.len,h=this.chart,a=0,g=f,c=this.isXAxis,v=c?"xData":"yData",e=this.min,m=this.max-
|
||||
e,k=f/m,n;this.series.forEach(function(f){if(f.bubblePadding&&(f.visible||!h.options.chart.ignoreHiddenSeries)){n=b.allowZoomOutside=!0;var r=f[v];c&&f.getRadii(0,0,f);if(0<m)for(var u=r.length;u--;)if(K(r[u])&&b.dataMin<=r[u]&&r[u]<=b.max){var B=f.radii&&f.radii[u]||0;a=Math.min((r[u]-e)*k-B,a);g=Math.max((r[u]-e)*k+B,g)}}});n&&0<m&&!this.logarithmic&&(g-=f,k*=(f+Math.max(0,a)-Math.min(g,f))/f,[["min","userMin",a],["max","userMax",g]].forEach(function(h){"undefined"===typeof y(b.options[h[0]],b[h[1]])&&
|
||||
(b[h[0]]+=h[2]/k)}))};p.registerSeriesType("bubble",k);"";"";return k});A(d,"Series/ColumnRange/ColumnRangePoint.js",[d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e){var l=this&&this.__extends||function(){var a=function(c,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g])};return a(c,e)};return function(c,e){function k(){this.constructor=c}a(c,e);c.prototype=null===e?Object.create(e):
|
||||
(k.prototype=e.prototype,new k)}}(),a=d.seriesTypes;d=a.column.prototype.pointClass;var c=e.extend,t=e.isNumber;e=function(a){function c(){var c=null!==a&&a.apply(this,arguments)||this;c.series=void 0;c.options=void 0;c.barX=void 0;c.pointWidth=void 0;c.shapeType=void 0;return c}l(c,a);c.prototype.isValid=function(){return t(this.low)};return c}(a.arearange.prototype.pointClass);c(e.prototype,{setState:d.prototype.setState});return e});A(d,"Series/ColumnRange/ColumnRangeSeries.js",[d["Series/ColumnRange/ColumnRangePoint.js"],
|
||||
d["Core/Globals.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l,a){var c=this&&this.__extends||function(){var b=function(a,g){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var g in a)a.hasOwnProperty(g)&&(b[g]=a[g])};return b(a,g)};return function(a,g){function c(){this.constructor=a}b(a,g);a.prototype=null===g?Object.create(g):(c.prototype=g.prototype,new c)}}();e=e.noop;var t=l.seriesTypes,p=t.arearange,k=
|
||||
t.column,x=k.prototype,w=p.prototype,b=a.clamp,g=a.merge,m=a.pick;a=a.extend;var n={pointRange:null,marker:null,states:{hover:{halo:!1}}};t=function(a){function e(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.points=void 0;b.options=void 0;return b}c(e,a);e.prototype.setOptions=function(){g(!0,arguments[0],{stacking:void 0});return w.setOptions.apply(this,arguments)};e.prototype.translate=function(){var a=this,g=a.yAxis,c=a.xAxis,e=c.startAngleRad,f,h=a.chart,u=a.xAxis.isRadial,
|
||||
r=Math.max(h.chartWidth,h.chartHeight)+999,k;x.translate.apply(a);a.points.forEach(function(v){var n=v.shapeArgs||{},B=a.options.minPointLength;v.plotHigh=k=b(g.translate(v.high,0,1,0,1),-r,r);v.plotLow=b(v.plotY,-r,r);var l=k;var d=m(v.rectPlotY,v.plotY)-k;Math.abs(d)<B?(B-=d,d+=B,l-=B/2):0>d&&(d*=-1,l-=d);u?(f=v.barX+e,v.shapeType="arc",v.shapeArgs=a.polarArc(l+d,l,f,f+v.pointWidth)):(n.height=d,n.y=l,B=n.x,B=void 0===B?0:B,n=n.width,n=void 0===n?0:n,v.tooltipPos=h.inverted?[g.len+g.pos-h.plotLeft-
|
||||
l-d/2,c.len+c.pos-h.plotTop-B-n/2,d]:[c.left-h.plotLeft+B+n/2,g.pos-h.plotTop+l+d/2,d])})};e.prototype.crispCol=function(){return x.crispCol.apply(this,arguments)};e.prototype.drawPoints=function(){return x.drawPoints.apply(this,arguments)};e.prototype.drawTracker=function(){return x.drawTracker.apply(this,arguments)};e.prototype.getColumnMetrics=function(){return x.getColumnMetrics.apply(this,arguments)};e.prototype.pointAttribs=function(){return x.pointAttribs.apply(this,arguments)};e.prototype.adjustForMissingColumns=
|
||||
function(){return x.adjustForMissingColumns.apply(this,arguments)};e.prototype.animate=function(){return x.animate.apply(this,arguments)};e.prototype.translate3dPoints=function(){return x.translate3dPoints.apply(this,arguments)};e.prototype.translate3dShapes=function(){return x.translate3dShapes.apply(this,arguments)};e.defaultOptions=g(k.defaultOptions,p.defaultOptions,n);return e}(p);a(t.prototype,{directTouch:!0,trackerGroups:["group","dataLabelsGroup"],drawGraph:e,getSymbol:e,polarArc:function(){return x.polarArc.apply(this,
|
||||
arguments)},pointClass:d});l.registerSeriesType("columnrange",t);"";return t});A(d,"Series/ColumnPyramid/ColumnPyramidSeries.js",[d["Series/Column/ColumnSeries.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l){var a=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var g in a)a.hasOwnProperty(g)&&(b[g]=a[g])};return a(c,b)};return function(c,b){function g(){this.constructor=
|
||||
c}a(c,b);c.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)}}(),c=d.prototype,t=l.clamp,p=l.merge,k=l.pick;l=function(e){function l(){var b=null!==e&&e.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}a(l,e);l.prototype.translate=function(){var b=this,a=b.chart,e=b.options,n=b.dense=2>b.closestPointRange*b.xAxis.transA;n=b.borderWidth=k(e.borderWidth,n?0:1);var d=b.yAxis,l=e.threshold,p=b.translatedThreshold=d.getThreshold(l),x=k(e.minPointLength,
|
||||
5),w=b.getColumnMetrics(),z=w.width,f=b.barW=Math.max(z,1+2*n),h=b.pointXOffset=w.offset;a.inverted&&(p-=.5);e.pointPadding&&(f=Math.ceil(f));c.translate.apply(b);b.points.forEach(function(g){var c=k(g.yBottom,p),u=999+Math.abs(c),v=t(g.plotY,-u,d.len+u);u=g.plotX+h;var m=f/2,n=Math.min(v,c);c=Math.max(v,c)-n;var q;g.barX=u;g.pointWidth=z;g.tooltipPos=a.inverted?[d.len+d.pos-a.plotLeft-v,b.xAxis.len-u-m,c]:[u+m,v+d.pos-a.plotTop,c];v=l+(g.total||g.y);"percent"===e.stacking&&(v=l+(0>g.y)?-100:100);
|
||||
v=d.toPixels(v,!0);var w=(q=a.plotHeight-v-(a.plotHeight-p))?m*(n-v)/q:0;var y=q?m*(n+c-v)/q:0;q=u-w+m;w=u+w+m;var C=u+y+m;y=u-y+m;var H=n-x;var D=n+c;0>g.y&&(H=n,D=n+c+x);a.inverted&&(C=d.width-n,q=v-(d.width-p),w=m*(v-C)/q,y=m*(v-(C-c))/q,q=u+m+w,w=q-2*w,C=u-y+m,y=u+y+m,H=n,D=n+c-x,0>g.y&&(D=n+c+x));g.shapeType="path";g.shapeArgs={x:q,y:H,width:w-q,height:c,d:[["M",q,H],["L",w,H],["L",C,D],["L",y,D],["Z"]]}})};l.defaultOptions=p(d.defaultOptions,{});return l}(d);e.registerSeriesType("columnpyramid",
|
||||
l);"";return l});A(d,"Series/ErrorBar/ErrorBarSeries.js",[d["Series/BoxPlot/BoxPlotSeries.js"],d["Series/Column/ColumnSeries.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l,a){var c=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var g in a)a.hasOwnProperty(g)&&(b[g]=a[g])};return a(c,b)};return function(c,b){function g(){this.constructor=c}a(c,b);c.prototype=
|
||||
null===b?Object.create(b):(g.prototype=b.prototype,new g)}}(),t=l.seriesTypes.arearange,p=a.merge;a=a.extend;var k=function(a){function k(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}c(k,a);k.prototype.getColumnMetrics=function(){return this.linkedParent&&this.linkedParent.columnMetrics||e.prototype.getColumnMetrics.call(this)};k.prototype.drawDataLabels=function(){var b=this.pointValKey;t&&(t.prototype.drawDataLabels.call(this),this.data.forEach(function(a){a.y=
|
||||
a[b]}))};k.prototype.toYData=function(b){return[b.low,b.high]};k.defaultOptions=p(d.defaultOptions,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},whiskerWidth:null});return k}(d);a(k.prototype,{pointArrayMap:["low","high"],pointValKey:"high",doQuartiles:!1});l.registerSeriesType("errorbar",k);"";return k});A(d,"Series/Gauge/GaugePoint.js",[d["Core/Series/SeriesRegistry.js"]],
|
||||
function(d){var e=this&&this.__extends||function(){var e=function(a,c){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e])};return e(a,c)};return function(a,c){function d(){this.constructor=a}e(a,c);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}();return function(d){function a(){var a=null!==d&&d.apply(this,arguments)||this;a.options=void 0;a.series=void 0;a.shapeArgs=void 0;return a}
|
||||
e(a,d);a.prototype.setState=function(a){this.state=a};return a}(d.series.prototype.pointClass)});A(d,"Series/Gauge/GaugeSeries.js",[d["Series/Gauge/GaugePoint.js"],d["Core/Globals.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l,a){var c=this&&this.__extends||function(){var b=function(a,g){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var g in a)a.hasOwnProperty(g)&&(b[g]=a[g])};return b(a,g)};return function(a,
|
||||
g){function c(){this.constructor=a}b(a,g);a.prototype=null===g?Object.create(g):(c.prototype=g.prototype,new c)}}();e=e.noop;var t=l.series,p=l.seriesTypes.column,k=a.clamp,x=a.isNumber,w=a.extend,b=a.merge,g=a.pick,m=a.pInt;a=function(a){function e(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.points=void 0;b.options=void 0;b.yAxis=void 0;return b}c(e,a);e.prototype.translate=function(){var a=this.yAxis,c=this.options,e=a.center;this.generatePoints();this.points.forEach(function(d){var n=
|
||||
b(c.dial,d.dial),f=m(g(n.radius,"80%"))*e[2]/200,h=m(g(n.baseLength,"70%"))*f/100,u=m(g(n.rearLength,"10%"))*f/100,r=n.baseWidth||3,l=n.topWidth||1,v=c.overshoot,p=a.startAngleRad+a.translate(d.y,null,null,null,!0);if(x(v)||!1===c.wrap)v=x(v)?v/180*Math.PI:0,p=k(p,a.startAngleRad-v,a.endAngleRad+v);p=180*p/Math.PI;d.shapeType="path";d.shapeArgs={d:n.path||[["M",-u,-r/2],["L",h,-r/2],["L",f,-l/2],["L",f,l/2],["L",h,r/2],["L",-u,r/2],["Z"]],translateX:e[0],translateY:e[1],rotation:p};d.plotX=e[0];d.plotY=
|
||||
e[1]})};e.prototype.drawPoints=function(){var a=this,c=a.chart,e=a.yAxis.center,d=a.pivot,m=a.options,f=m.pivot,h=c.renderer;a.points.forEach(function(f){var g=f.graphic,e=f.shapeArgs,u=e.d,d=b(m.dial,f.dial);g?(g.animate(e),e.d=u):f.graphic=h[f.shapeType](e).attr({rotation:e.rotation,zIndex:1}).addClass("highcharts-dial").add(a.group);if(!c.styledMode)f.graphic[g?"animate":"attr"]({stroke:d.borderColor||"none","stroke-width":d.borderWidth||0,fill:d.backgroundColor||"#000000"})});d?d.animate({translateX:e[0],
|
||||
translateY:e[1]}):(a.pivot=h.circle(0,0,g(f.radius,5)).attr({zIndex:2}).addClass("highcharts-pivot").translate(e[0],e[1]).add(a.group),c.styledMode||a.pivot.attr({"stroke-width":f.borderWidth||0,stroke:f.borderColor||"#cccccc",fill:f.backgroundColor||"#000000"}))};e.prototype.animate=function(b){var a=this;b||a.points.forEach(function(b){var g=b.graphic;g&&(g.attr({rotation:180*a.yAxis.startAngleRad/Math.PI}),g.animate({rotation:b.shapeArgs.rotation},a.options.animation))})};e.prototype.render=function(){this.group=
|
||||
this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);t.prototype.render.call(this);this.group.clip(this.chart.clipRect)};e.prototype.setData=function(b,a){t.prototype.setData.call(this,b,!1);this.processData();this.generatePoints();g(a,!0)&&this.chart.redraw()};e.prototype.hasData=function(){return!!this.points.length};e.defaultOptions=b(t.defaultOptions,{dataLabels:{borderColor:"#cccccc",borderRadius:3,borderWidth:1,crop:!1,defer:!1,enabled:!0,
|
||||
verticalAlign:"top",y:15,zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1});return e}(t);w(a.prototype,{angular:!0,directTouch:!0,drawGraph:e,drawTracker:p.prototype.drawTracker,fixedBox:!0,forceDL:!0,noSharedTooltip:!0,pointClass:d,trackerGroups:["group","dataLabelsGroup"]});l.registerSeriesType("gauge",a);"";return a});A(d,"Series/PackedBubble/PackedBubblePoint.js",[d["Core/Chart/Chart.js"],d["Core/Series/Point.js"],d["Core/Series/SeriesRegistry.js"]],function(d,e,l){var a=this&&
|
||||
this.__extends||function(){var a=function(c,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e])};return a(c,e)};return function(c,e){function d(){this.constructor=c}a(c,e);c.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)}}();return function(c){function l(){var a=null!==c&&c.apply(this,arguments)||this;a.degree=NaN;a.mass=NaN;a.radius=NaN;a.options=void 0;a.series=void 0;a.value=
|
||||
null;return a}a(l,c);l.prototype.destroy=function(){this.series.layout&&this.series.layout.removeElementFromCollection(this,this.series.layout.nodes);return e.prototype.destroy.apply(this,arguments)};l.prototype.firePointEvent=function(){var a=this.series.options;if(this.isParentNode&&a.parentNode){var c=a.allowPointSelect;a.allowPointSelect=a.parentNode.allowPointSelect;e.prototype.firePointEvent.apply(this,arguments);a.allowPointSelect=c}else e.prototype.firePointEvent.apply(this,arguments)};l.prototype.select=
|
||||
function(){var a=this.series.chart;this.isParentNode?(a.getSelectedPoints=a.getSelectedParentNodes,e.prototype.select.apply(this,arguments),a.getSelectedPoints=d.prototype.getSelectedPoints):e.prototype.select.apply(this,arguments)};return l}(l.seriesTypes.bubble.prototype.pointClass)});A(d,"Series/Networkgraph/DraggableNodes.js",[d["Core/Chart/Chart.js"],d["Core/Globals.js"],d["Core/Utilities.js"]],function(d,e,l){var a=l.addEvent;e.dragNodesMixin={onMouseDown:function(a,e){e=this.chart.pointer.normalize(e);
|
||||
a.fixedPosition={chartX:e.chartX,chartY:e.chartY,plotX:a.plotX,plotY:a.plotY};a.inDragMode=!0},onMouseMove:function(a,e){if(a.fixedPosition&&a.inDragMode){var c=this.chart,d=c.pointer.normalize(e);e=a.fixedPosition.chartX-d.chartX;d=a.fixedPosition.chartY-d.chartY;var l=void 0,w=void 0,b=c.graphLayoutsLookup;if(5<Math.abs(e)||5<Math.abs(d))l=a.fixedPosition.plotX-e,w=a.fixedPosition.plotY-d,c.isInsidePlot(l,w)&&(a.plotX=l,a.plotY=w,a.hasDragged=!0,this.redrawHalo(a),b.forEach(function(b){b.restartSimulation()}))}},
|
||||
onMouseUp:function(a,e){a.fixedPosition&&(a.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw()),a.inDragMode=a.hasDragged=!1,this.options.fixedDraggable||delete a.fixedPosition)},redrawHalo:function(a){a&&this.halo&&this.halo.attr({d:a.haloPath(this.options.states.hover.halo.size)})}};a(d,"load",function(){var c=this,e,d,l;c.container&&(e=a(c.container,"mousedown",function(e){var k=c.hoverPoint;k&&k.series&&k.series.hasDraggableNodes&&k.series.options.draggable&&(k.series.onMouseDown(k,
|
||||
e),d=a(c.container,"mousemove",function(b){return k&&k.series&&k.series.onMouseMove(k,b)}),l=a(c.container.ownerDocument,"mouseup",function(b){d();l();return k&&k.series&&k.series.onMouseUp(k,b)}))}));a(c,"destroy",function(){e()})})});A(d,"Series/Networkgraph/Integrations.js",[d["Core/Globals.js"]],function(d){d.networkgraphIntegrations={verlet:{attractiveForceFunction:function(e,d){return(d-e)/e},repulsiveForceFunction:function(e,d){return(d-e)/e*(d>e?1:0)},barycenter:function(){var e=this.options.gravitationalConstant,
|
||||
d=this.barycenter.xFactor,a=this.barycenter.yFactor;d=(d-(this.box.left+this.box.width)/2)*e;a=(a-(this.box.top+this.box.height)/2)*e;this.nodes.forEach(function(c){c.fixedPosition||(c.plotX-=d/c.mass/c.degree,c.plotY-=a/c.mass/c.degree)})},repulsive:function(e,d,a){d=d*this.diffTemperature/e.mass/e.degree;e.fixedPosition||(e.plotX+=a.x*d,e.plotY+=a.y*d)},attractive:function(e,d,a){var c=e.getMass(),l=-a.x*d*this.diffTemperature;d=-a.y*d*this.diffTemperature;e.fromNode.fixedPosition||(e.fromNode.plotX-=
|
||||
l*c.fromNode/e.fromNode.degree,e.fromNode.plotY-=d*c.fromNode/e.fromNode.degree);e.toNode.fixedPosition||(e.toNode.plotX+=l*c.toNode/e.toNode.degree,e.toNode.plotY+=d*c.toNode/e.toNode.degree)},integrate:function(e,d){var a=-e.options.friction,c=e.options.maxSpeed,l=(d.plotX+d.dispX-d.prevX)*a;a*=d.plotY+d.dispY-d.prevY;var p=Math.abs,k=p(l)/(l||1);p=p(a)/(a||1);l=k*Math.min(c,Math.abs(l));a=p*Math.min(c,Math.abs(a));d.prevX=d.plotX+d.dispX;d.prevY=d.plotY+d.dispY;d.plotX+=l;d.plotY+=a;d.temperature=
|
||||
e.vectorLength({x:l,y:a})},getK:function(e){return Math.pow(e.box.width*e.box.height/e.nodes.length,.5)}},euler:{attractiveForceFunction:function(e,d){return e*e/d},repulsiveForceFunction:function(e,d){return d*d/e},barycenter:function(){var e=this.options.gravitationalConstant,d=this.barycenter.xFactor,a=this.barycenter.yFactor;this.nodes.forEach(function(c){if(!c.fixedPosition){var l=c.getDegree();l*=1+l/2;c.dispX+=(d-c.plotX)*e*l/c.degree;c.dispY+=(a-c.plotY)*e*l/c.degree}})},repulsive:function(e,
|
||||
d,a,c){e.dispX+=a.x/c*d/e.degree;e.dispY+=a.y/c*d/e.degree},attractive:function(e,d,a,c){var l=e.getMass(),p=a.x/c*d;d*=a.y/c;e.fromNode.fixedPosition||(e.fromNode.dispX-=p*l.fromNode/e.fromNode.degree,e.fromNode.dispY-=d*l.fromNode/e.fromNode.degree);e.toNode.fixedPosition||(e.toNode.dispX+=p*l.toNode/e.toNode.degree,e.toNode.dispY+=d*l.toNode/e.toNode.degree)},integrate:function(e,d){d.dispX+=d.dispX*e.options.friction;d.dispY+=d.dispY*e.options.friction;var a=d.temperature=e.vectorLength({x:d.dispX,
|
||||
y:d.dispY});0!==a&&(d.plotX+=d.dispX/a*Math.min(Math.abs(d.dispX),e.temperature),d.plotY+=d.dispY/a*Math.min(Math.abs(d.dispY),e.temperature))},getK:function(e){return Math.pow(e.box.width*e.box.height/e.nodes.length,.3)}}}});A(d,"Series/Networkgraph/QuadTree.js",[d["Core/Globals.js"],d["Core/Utilities.js"]],function(d,e){e=e.extend;var l=d.QuadTreeNode=function(a){this.box=a;this.boxSize=Math.min(a.width,a.height);this.nodes=[];this.body=this.isInternal=!1;this.isEmpty=!0};e(l.prototype,{insert:function(a,
|
||||
c){this.isInternal?this.nodes[this.getBoxPosition(a)].insert(a,c-1):(this.isEmpty=!1,this.body?c?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,c-1),this.body=!0),this.nodes[this.getBoxPosition(a)].insert(a,c-1)):(c=new l({top:a.plotX,left:a.plotY,width:.1,height:.1}),c.body=a,c.isInternal=!1,this.nodes.push(c)):(this.isInternal=!1,this.body=a))},updateMassAndCenter:function(){var a=0,c=0,e=0;this.isInternal?(this.nodes.forEach(function(d){d.isEmpty||
|
||||
(a+=d.mass,c+=d.plotX*d.mass,e+=d.plotY*d.mass)}),c/=a,e/=a):this.body&&(a=this.body.mass,c=this.body.plotX,e=this.body.plotY);this.mass=a;this.plotX=c;this.plotY=e},divideBox:function(){var a=this.box.width/2,c=this.box.height/2;this.nodes[0]=new l({left:this.box.left,top:this.box.top,width:a,height:c});this.nodes[1]=new l({left:this.box.left+a,top:this.box.top,width:a,height:c});this.nodes[2]=new l({left:this.box.left+a,top:this.box.top+c,width:a,height:c});this.nodes[3]=new l({left:this.box.left,
|
||||
top:this.box.top+c,width:a,height:c})},getBoxPosition:function(a){var c=a.plotY<this.box.top+this.box.height/2;return a.plotX<this.box.left+this.box.width/2?c?0:3:c?1:2}});d=d.QuadTree=function(a,c,e,d){this.box={left:a,top:c,width:e,height:d};this.maxDepth=25;this.root=new l(this.box,"0");this.root.isInternal=!0;this.root.isRoot=!0;this.root.divideBox()};e(d.prototype,{insertNodes:function(a){a.forEach(function(a){this.root.insert(a,this.maxDepth)},this)},visitNodeRecursive:function(a,c,e){var d;
|
||||
a||(a=this.root);a===this.root&&c&&(d=c(a));!1!==d&&(a.nodes.forEach(function(a){if(a.isInternal){c&&(d=c(a));if(!1===d)return;this.visitNodeRecursive(a,c,e)}else a.body&&c&&c(a.body);e&&e(a)},this),a===this.root&&e&&e(a))},calculateMassAndCenter:function(){this.visitNodeRecursive(null,null,function(a){a.updateMassAndCenter()})}})});A(d,"Series/Networkgraph/Layouts.js",[d["Core/Chart/Chart.js"],d["Core/Animation/AnimationUtilities.js"],d["Core/Globals.js"],d["Core/Utilities.js"]],function(d,e,l,a){var c=
|
||||
e.setAnimation;e=a.addEvent;var t=a.clamp,p=a.defined,k=a.extend,x=a.isFunction,w=a.pick;l.layouts={"reingold-fruchterman":function(){}};k(l.layouts["reingold-fruchterman"].prototype,{init:function(b){this.options=b;this.nodes=[];this.links=[];this.series=[];this.box={x:0,y:0,width:0,height:0};this.setInitialRendering(!0);this.integration=l.networkgraphIntegrations[b.integration];this.enableSimulation=b.enableSimulation;this.attractiveForce=w(b.attractiveForce,this.integration.attractiveForceFunction);
|
||||
this.repulsiveForce=w(b.repulsiveForce,this.integration.repulsiveForceFunction);this.approximation=b.approximation},updateSimulation:function(b){this.enableSimulation=w(b,this.options.enableSimulation)},start:function(){var b=this.series,a=this.options;this.currentStep=0;this.forces=b[0]&&b[0].forces||[];this.chart=b[0]&&b[0].chart;this.initialRendering&&(this.initPositions(),b.forEach(function(b){b.finishedAnimating=!0;b.render()}));this.setK();this.resetSimulation(a);this.enableSimulation&&this.step()},
|
||||
step:function(){var b=this,a=this.series;b.currentStep++;"barnes-hut"===b.approximation&&(b.createQuadTree(),b.quadTree.calculateMassAndCenter());b.forces.forEach(function(a){b[a+"Forces"](b.temperature)});b.applyLimits(b.temperature);b.temperature=b.coolDown(b.startTemperature,b.diffTemperature,b.currentStep);b.prevSystemTemperature=b.systemTemperature;b.systemTemperature=b.getSystemTemperature();b.enableSimulation&&(a.forEach(function(b){b.chart&&b.render()}),b.maxIterations--&&isFinite(b.temperature)&&
|
||||
!b.isStable()?(b.simulation&&l.win.cancelAnimationFrame(b.simulation),b.simulation=l.win.requestAnimationFrame(function(){b.step()})):b.simulation=!1)},stop:function(){this.simulation&&l.win.cancelAnimationFrame(this.simulation)},setArea:function(b,a,c,e){this.box={left:b,top:a,width:c,height:e}},setK:function(){this.k=this.options.linkLength||this.integration.getK(this)},addElementsToCollection:function(b,a){b.forEach(function(b){-1===a.indexOf(b)&&a.push(b)})},removeElementFromCollection:function(b,
|
||||
a){b=a.indexOf(b);-1!==b&&a.splice(b,1)},clear:function(){this.nodes.length=0;this.links.length=0;this.series.length=0;this.resetSimulation()},resetSimulation:function(){this.forcedStop=!1;this.systemTemperature=0;this.setMaxIterations();this.setTemperature();this.setDiffTemperature()},restartSimulation:function(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))},
|
||||
setMaxIterations:function(b){this.maxIterations=w(b,this.options.maxIterations)},setTemperature:function(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)},setDiffTemperature:function(){this.diffTemperature=this.startTemperature/(this.options.maxIterations+1)},setInitialRendering:function(b){this.initialRendering=b},createQuadTree:function(){this.quadTree=new l.QuadTree(this.box.left,this.box.top,this.box.width,this.box.height);this.quadTree.insertNodes(this.nodes)},initPositions:function(){var b=
|
||||
this.options.initialPositions;x(b)?(b.call(this),this.nodes.forEach(function(b){p(b.prevX)||(b.prevX=b.plotX);p(b.prevY)||(b.prevY=b.plotY);b.dispX=0;b.dispY=0})):"circle"===b?this.setCircularPositions():this.setRandomPositions()},setCircularPositions:function(){function b(a){a.linksFrom.forEach(function(a){l[a.toNode.id]||(l[a.toNode.id]=!0,k.push(a.toNode),b(a.toNode))})}var a=this.box,c=this.nodes,e=2*Math.PI/(c.length+1),d=c.filter(function(b){return 0===b.linksTo.length}),k=[],l={},p=this.options.initialPositionRadius;
|
||||
d.forEach(function(a){k.push(a);b(a)});k.length?c.forEach(function(b){-1===k.indexOf(b)&&k.push(b)}):k=c;k.forEach(function(b,c){b.plotX=b.prevX=w(b.plotX,a.width/2+p*Math.cos(c*e));b.plotY=b.prevY=w(b.plotY,a.height/2+p*Math.sin(c*e));b.dispX=0;b.dispY=0})},setRandomPositions:function(){function b(b){b=b*b/Math.PI;return b-=Math.floor(b)}var a=this.box,c=this.nodes,e=c.length+1;c.forEach(function(c,g){c.plotX=c.prevX=w(c.plotX,a.width*b(g));c.plotY=c.prevY=w(c.plotY,a.height*b(e+g));c.dispX=0;c.dispY=
|
||||
0})},force:function(b){this.integration[b].apply(this,Array.prototype.slice.call(arguments,1))},barycenterForces:function(){this.getBarycenter();this.force("barycenter")},getBarycenter:function(){var b=0,a=0,c=0;this.nodes.forEach(function(g){a+=g.plotX*g.mass;c+=g.plotY*g.mass;b+=g.mass});return this.barycenter={x:a,y:c,xFactor:a/b,yFactor:c/b}},barnesHutApproximation:function(b,a){var c=this.getDistXY(b,a),g=this.vectorLength(c);if(b!==a&&0!==g)if(a.isInternal)if(a.boxSize/g<this.options.theta&&
|
||||
0!==g){var e=this.repulsiveForce(g,this.k);this.force("repulsive",b,e*a.mass,c,g);var d=!1}else d=!0;else e=this.repulsiveForce(g,this.k),this.force("repulsive",b,e*a.mass,c,g);return d},repulsiveForces:function(){var b=this;"barnes-hut"===b.approximation?b.nodes.forEach(function(a){b.quadTree.visitNodeRecursive(null,function(c){return b.barnesHutApproximation(a,c)})}):b.nodes.forEach(function(a){b.nodes.forEach(function(c){if(a!==c&&!a.fixedPosition){var g=b.getDistXY(a,c);var e=b.vectorLength(g);
|
||||
if(0!==e){var d=b.repulsiveForce(e,b.k);b.force("repulsive",a,d*c.mass,g,e)}}})})},attractiveForces:function(){var b=this,a,c,e;b.links.forEach(function(g){g.fromNode&&g.toNode&&(a=b.getDistXY(g.fromNode,g.toNode),c=b.vectorLength(a),0!==c&&(e=b.attractiveForce(c,b.k),b.force("attractive",g,e,a,c)))})},applyLimits:function(){var b=this;b.nodes.forEach(function(a){a.fixedPosition||(b.integration.integrate(b,a),b.applyLimitBox(a,b.box),a.dispX=0,a.dispY=0)})},applyLimitBox:function(b,a){var c=b.radius;
|
||||
b.plotX=t(b.plotX,a.left+c,a.width-c);b.plotY=t(b.plotY,a.top+c,a.height-c)},coolDown:function(b,a,c){return b-a*c},isStable:function(){return.00001>Math.abs(this.systemTemperature-this.prevSystemTemperature)||0>=this.temperature},getSystemTemperature:function(){return this.nodes.reduce(function(b,a){return b+a.temperature},0)},vectorLength:function(b){return Math.sqrt(b.x*b.x+b.y*b.y)},getDistR:function(b,a){b=this.getDistXY(b,a);return this.vectorLength(b)},getDistXY:function(b,a){var c=b.plotX-
|
||||
a.plotX;b=b.plotY-a.plotY;return{x:c,y:b,absX:Math.abs(c),absY:Math.abs(b)}}});e(d,"predraw",function(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(b){b.stop()})});e(d,"render",function(){function b(b){b.maxIterations--&&isFinite(b.temperature)&&!b.isStable()&&!b.enableSimulation&&(b.beforeStep&&b.beforeStep(),b.step(),e=!1,a=!0)}var a=!1;if(this.graphLayoutsLookup){c(!1,this);for(this.graphLayoutsLookup.forEach(function(b){b.start()});!e;){var e=!0;this.graphLayoutsLookup.forEach(b)}a&&
|
||||
this.series.forEach(function(b){b&&b.layout&&b.render()})}});e(d,"beforePrint",function(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(function(b){b.updateSimulation(!1)}),this.redraw())});e(d,"afterPrint",function(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(b){b.updateSimulation()});this.redraw()})});A(d,"Series/PackedBubble/PackedBubbleComposition.js",[d["Core/Chart/Chart.js"],d["Core/Globals.js"],d["Core/Utilities.js"]],function(d,e,l){var a=e.layouts["reingold-fruchterman"],
|
||||
c=l.addEvent,t=l.extendClass,p=l.pick;d.prototype.getSelectedParentNodes=function(){var a=[];this.series.forEach(function(c){c.parentNode&&c.parentNode.selected&&a.push(c.parentNode)});return a};e.networkgraphIntegrations.packedbubble={repulsiveForceFunction:function(a,c,e,b){return Math.min(a,(e.marker.radius+b.marker.radius)/2)},barycenter:function(){var a=this,c=a.options.gravitationalConstant,e=a.box,b=a.nodes,d,m;b.forEach(function(g){a.options.splitSeries&&!g.isParentNode?(d=g.series.parentNode.plotX,
|
||||
m=g.series.parentNode.plotY):(d=e.width/2,m=e.height/2);g.fixedPosition||(g.plotX-=(g.plotX-d)*c/(g.mass*Math.sqrt(b.length)),g.plotY-=(g.plotY-m)*c/(g.mass*Math.sqrt(b.length)))})},repulsive:function(a,c,e,b){var g=c*this.diffTemperature/a.mass/a.degree;c=e.x*g;e=e.y*g;a.fixedPosition||(a.plotX+=c,a.plotY+=e);b.fixedPosition||(b.plotX-=c,b.plotY-=e)},integrate:e.networkgraphIntegrations.verlet.integrate,getK:e.noop};e.layouts.packedbubble=t(a,{beforeStep:function(){this.options.marker&&this.series.forEach(function(a){a&&
|
||||
a.calculateParentRadius()})},isStable:function(){var a=Math.abs(this.prevSystemTemperature-this.systemTemperature);return 1>Math.abs(10*this.systemTemperature/Math.sqrt(this.nodes.length))&&.00001>a||0>=this.temperature},setCircularPositions:function(){var a=this,c=a.box,e=a.nodes,b=2*Math.PI/(e.length+1),g,d,n=a.options.initialPositionRadius;e.forEach(function(e,k){a.options.splitSeries&&!e.isParentNode?(g=e.series.parentNode.plotX,d=e.series.parentNode.plotY):(g=c.width/2,d=c.height/2);e.plotX=
|
||||
e.prevX=p(e.plotX,g+n*Math.cos(e.index||k*b));e.plotY=e.prevY=p(e.plotY,d+n*Math.sin(e.index||k*b));e.dispX=0;e.dispY=0})},repulsiveForces:function(){var a=this,c,e,b,g=a.options.bubblePadding;a.nodes.forEach(function(d){d.degree=d.mass;d.neighbours=0;a.nodes.forEach(function(k){c=0;d===k||d.fixedPosition||!a.options.seriesInteraction&&d.series!==k.series||(b=a.getDistXY(d,k),e=a.vectorLength(b)-(d.marker.radius+k.marker.radius+g),0>e&&(d.degree+=.01,d.neighbours++,c=a.repulsiveForce(-e/Math.sqrt(d.neighbours),
|
||||
a.k,d,k)),a.force("repulsive",d,c*k.mass,b,k,e))})})},applyLimitBox:function(c){if(this.options.splitSeries&&!c.isParentNode&&this.options.parentNodeLimit){var e=this.getDistXY(c,c.series.parentNode);var d=c.series.parentNodeRadius-c.marker.radius-this.vectorLength(e);0>d&&d>-2*c.marker.radius&&(c.plotX-=.01*e.x,c.plotY-=.01*e.y)}a.prototype.applyLimitBox.apply(this,arguments)}});c(d,"beforeRedraw",function(){this.allDataPoints&&delete this.allDataPoints})});A(d,"Series/PackedBubble/PackedBubbleSeries.js",
|
||||
[d["Core/Color/Color.js"],d["Core/Globals.js"],d["Series/PackedBubble/PackedBubblePoint.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"]],function(d,e,l,a,c){var t=this&&this.__extends||function(){var a=function(b,h){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var h in b)b.hasOwnProperty(h)&&(a[h]=b[h])};return a(b,h)};return function(b,h){function f(){this.constructor=b}a(b,h);b.prototype=null===h?Object.create(h):(f.prototype=
|
||||
h.prototype,new f)}}(),p=d.parse,k=a.series,x=a.seriesTypes.bubble,w=c.addEvent,b=c.clamp,g=c.defined,m=c.extend,n=c.fireEvent,q=c.isArray,H=c.isNumber,A=c.merge,I=c.pick,y=e.dragNodesMixin;d=function(a){function f(){var b=null!==a&&a.apply(this,arguments)||this;b.chart=void 0;b.data=void 0;b.layout=void 0;b.options=void 0;b.points=void 0;b.xData=void 0;return b}t(f,a);f.prototype.accumulateAllPoints=function(a){var b=a.chart,h=[],f,c;for(f=0;f<b.series.length;f++)if(a=b.series[f],a.is("packedbubble")&&
|
||||
a.visible||!b.options.chart.ignoreHiddenSeries)for(c=0;c<a.yData.length;c++)h.push([null,null,a.yData[c],a.index,c,{id:c,marker:{radius:0}}]);return h};f.prototype.addLayout=function(){var a=this.options.layoutAlgorithm,b=this.chart.graphLayoutsStorage,f=this.chart.graphLayoutsLookup,c=this.chart.options.chart;b||(this.chart.graphLayoutsStorage=b={},this.chart.graphLayoutsLookup=f=[]);var d=b[a.type];d||(a.enableSimulation=g(c.forExport)?!c.forExport:a.enableSimulation,b[a.type]=d=new e.layouts[a.type],
|
||||
d.init(a),f.splice(d.index,0,d));this.layout=d;this.points.forEach(function(a){a.mass=2;a.degree=1;a.collisionNmb=1});d.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight);d.addElementsToCollection([this],d.series);d.addElementsToCollection(this.points,d.nodes)};f.prototype.addSeriesLayout=function(){var a=this.options.layoutAlgorithm,b=this.chart.graphLayoutsStorage,f=this.chart.graphLayoutsLookup,c=A(a,a.parentNodeOptions,{enableSimulation:this.layout.options.enableSimulation});var d=b[a.type+
|
||||
"-series"];d||(b[a.type+"-series"]=d=new e.layouts[a.type],d.init(c),f.splice(d.index,0,d));this.parentNodeLayout=d;this.createParentNodes()};f.prototype.calculateParentRadius=function(){var a=this.seriesBox();this.parentNodeRadius=b(Math.sqrt(2*this.parentNodeMass/Math.PI)+20,20,a?Math.max(Math.sqrt(Math.pow(a.width,2)+Math.pow(a.height,2))/2+20,20):Math.sqrt(2*this.parentNodeMass/Math.PI)+20);this.parentNode&&(this.parentNode.marker.radius=this.parentNode.radius=this.parentNodeRadius)};f.prototype.calculateZExtremes=
|
||||
function(){var a=this.options.zMin,b=this.options.zMax,f=Infinity,c=-Infinity;if(a&&b)return[a,b];this.chart.series.forEach(function(a){a.yData.forEach(function(a){g(a)&&(a>c&&(c=a),a<f&&(f=a))})});a=I(a,f);b=I(b,c);return[a,b]};f.prototype.checkOverlap=function(a,b){var h=a[0]-b[0],f=a[1]-b[1];return-.001>Math.sqrt(h*h+f*f)-Math.abs(a[2]+b[2])};f.prototype.createParentNodes=function(){var a=this,b=a.chart,f=a.parentNodeLayout,c,e=a.parentNode,d=a.pointClass,g=a.layout.options,k={radius:a.parentNodeRadius,
|
||||
lineColor:a.color,fillColor:p(a.color).brighten(.4).get()};g.parentNodeOptions&&(k=A(g.parentNodeOptions.marker||{},k));a.parentNodeMass=0;a.points.forEach(function(b){a.parentNodeMass+=Math.PI*Math.pow(b.marker.radius,2)});a.calculateParentRadius();f.nodes.forEach(function(b){b.seriesIndex===a.index&&(c=!0)});f.setArea(0,0,b.plotWidth,b.plotHeight);c||(e||(e=(new d).init(this,{mass:a.parentNodeRadius/2,marker:k,dataLabels:{inside:!1},states:{normal:{marker:k},hover:{marker:k}},dataLabelOnNull:!0,
|
||||
degree:a.parentNodeRadius,isParentNode:!0,seriesIndex:a.index})),a.parentNode&&(e.plotX=a.parentNode.plotX,e.plotY=a.parentNode.plotY),a.parentNode=e,f.addElementsToCollection([a],f.series),f.addElementsToCollection([e],f.nodes))};f.prototype.deferLayout=function(){var a=this.options.layoutAlgorithm;this.visible&&(this.addLayout(),a.splitSeries&&this.addSeriesLayout())};f.prototype.destroy=function(){this.chart.graphLayoutsLookup&&this.chart.graphLayoutsLookup.forEach(function(a){a.removeElementFromCollection(this,
|
||||
a.series)},this);this.parentNode&&this.parentNodeLayout&&(this.parentNodeLayout.removeElementFromCollection(this.parentNode,this.parentNodeLayout.nodes),this.parentNode.dataLabel&&(this.parentNode.dataLabel=this.parentNode.dataLabel.destroy()));k.prototype.destroy.apply(this,arguments)};f.prototype.drawDataLabels=function(){var a=this.options.dataLabels.textPath,b=this.points;k.prototype.drawDataLabels.apply(this,arguments);this.parentNode&&(this.parentNode.formatPrefix="parentNode",this.points=[this.parentNode],
|
||||
this.options.dataLabels.textPath=this.options.dataLabels.parentNodeTextPath,k.prototype.drawDataLabels.apply(this,arguments),this.points=b,this.options.dataLabels.textPath=a)};f.prototype.drawGraph=function(){if(this.layout&&this.layout.options.splitSeries){var a=this.chart;var b=this.layout.options.parentNodeOptions.marker;var f={fill:b.fillColor||p(this.color).brighten(.4).get(),opacity:b.fillOpacity,stroke:b.lineColor||this.color,"stroke-width":I(b.lineWidth,this.options.lineWidth)};this.parentNodesGroup||
|
||||
(this.parentNodesGroup=this.plotGroup("parentNodesGroup","parentNode",this.visible?"inherit":"hidden",.1,a.seriesGroup),this.group.attr({zIndex:2}));this.calculateParentRadius();b=A({x:this.parentNode.plotX-this.parentNodeRadius,y:this.parentNode.plotY-this.parentNodeRadius,width:2*this.parentNodeRadius,height:2*this.parentNodeRadius},f);this.parentNode.graphic||(this.graph=this.parentNode.graphic=a.renderer.symbol(f.symbol).add(this.parentNodesGroup));this.parentNode.graphic.attr(b)}};f.prototype.drawTracker=
|
||||
function(){var b=this.parentNode;a.prototype.drawTracker.call(this);if(b){var f=q(b.dataLabels)?b.dataLabels:b.dataLabel?[b.dataLabel]:[];b.graphic&&(b.graphic.element.point=b);f.forEach(function(a){a.div?a.div.point=b:a.element.point=b})}};f.prototype.getPointRadius=function(){var a=this,f=a.chart,c=a.options,e=c.useSimulation,d=Math.min(f.plotWidth,f.plotHeight),g={},k=[],l=f.allDataPoints,n,m,p,z;["minSize","maxSize"].forEach(function(a){var b=parseInt(c[a],10),f=/%$/.test(c[a]);g[a]=f?d*b/100:
|
||||
b*Math.sqrt(l.length)});f.minRadius=n=g.minSize/Math.sqrt(l.length);f.maxRadius=m=g.maxSize/Math.sqrt(l.length);var q=e?a.calculateZExtremes():[n,m];(l||[]).forEach(function(f,h){p=e?b(f[2],q[0],q[1]):f[2];z=a.getRadius(q[0],q[1],n,m,p);0===z&&(z=null);l[h][2]=z;k.push(z)});a.radii=k};f.prototype.init=function(){k.prototype.init.apply(this,arguments);this.eventsToUnbind.push(w(this,"updatedData",function(){this.chart.series.forEach(function(a){a.type===this.type&&(a.isDirty=!0)},this)}));return this};
|
||||
f.prototype.onMouseUp=function(a){if(a.fixedPosition&&!a.removed){var b,f,h=this.layout,c=this.parentNodeLayout;c&&h.options.dragBetweenSeries&&c.nodes.forEach(function(c){a&&a.marker&&c!==a.series.parentNode&&(b=h.getDistXY(a,c),f=h.vectorLength(b)-c.marker.radius-a.marker.radius,0>f&&(c.series.addPoint(A(a.options,{plotX:a.plotX,plotY:a.plotY}),!1),h.removeElementFromCollection(a,h.nodes),a.remove()))});y.onMouseUp.apply(this,arguments)}};f.prototype.placeBubbles=function(a){var b=this.checkOverlap,
|
||||
f=this.positionBubble,c=[],h=1,e=0,d=0;var g=[];var k;a=a.sort(function(a,b){return b[2]-a[2]});if(a.length){c.push([[0,0,a[0][2],a[0][3],a[0][4]]]);if(1<a.length)for(c.push([[0,0-a[1][2]-a[0][2],a[1][2],a[1][3],a[1][4]]]),k=2;k<a.length;k++)a[k][2]=a[k][2]||1,g=f(c[h][e],c[h-1][d],a[k]),b(g,c[h][0])?(c.push([]),d=0,c[h+1].push(f(c[h][e],c[h][0],a[k])),h++,e=0):1<h&&c[h-1][d+1]&&b(g,c[h-1][d+1])?(d++,c[h].push(f(c[h][e],c[h-1][d],a[k])),e++):(e++,c[h].push(g));this.chart.stages=c;this.chart.rawPositions=
|
||||
[].concat.apply([],c);this.resizeRadius();g=this.chart.rawPositions}return g};f.prototype.pointAttribs=function(a,b){var f=this.options,c=f.marker;a&&a.isParentNode&&f.layoutAlgorithm&&f.layoutAlgorithm.parentNodeOptions&&(c=f.layoutAlgorithm.parentNodeOptions.marker);f=c.fillOpacity;a=k.prototype.pointAttribs.call(this,a,b);1!==f&&(a["fill-opacity"]=f);return a};f.prototype.positionBubble=function(a,b,f){var c=Math.sqrt,h=Math.asin,e=Math.acos,d=Math.pow,g=Math.abs;c=c(d(a[0]-b[0],2)+d(a[1]-b[1],
|
||||
2));e=e((d(c,2)+d(f[2]+b[2],2)-d(f[2]+a[2],2))/(2*(f[2]+b[2])*c));h=h(g(a[0]-b[0])/c);a=(0>a[1]-b[1]?0:Math.PI)+e+h*(0>(a[0]-b[0])*(a[1]-b[1])?1:-1);return[b[0]+(b[2]+f[2])*Math.sin(a),b[1]-(b[2]+f[2])*Math.cos(a),f[2],f[3],f[4]]};f.prototype.render=function(){var a=[];k.prototype.render.apply(this,arguments);this.options.dataLabels.allowOverlap||(this.data.forEach(function(b){q(b.dataLabels)&&b.dataLabels.forEach(function(b){a.push(b)})}),this.options.useSimulation&&this.chart.hideOverlappingLabels(a))};
|
||||
f.prototype.resizeRadius=function(){var a=this.chart,b=a.rawPositions,f=Math.min,c=Math.max,e=a.plotLeft,d=a.plotTop,g=a.plotHeight,k=a.plotWidth,l,n,m;var p=l=Number.POSITIVE_INFINITY;var z=n=Number.NEGATIVE_INFINITY;for(m=0;m<b.length;m++){var q=b[m][2];p=f(p,b[m][0]-q);z=c(z,b[m][0]+q);l=f(l,b[m][1]-q);n=c(n,b[m][1]+q)}m=[z-p,n-l];f=f.apply([],[(k-e)/m[0],(g-d)/m[1]]);if(1e-10<Math.abs(f-1)){for(m=0;m<b.length;m++)b[m][2]*=f;this.placeBubbles(b)}else a.diffY=g/2+d-l-(n-l)/2,a.diffX=k/2+e-p-(z-
|
||||
p)/2};f.prototype.seriesBox=function(){var a=this.chart,b=Math.max,f=Math.min,c,e=[a.plotLeft,a.plotLeft+a.plotWidth,a.plotTop,a.plotTop+a.plotHeight];this.data.forEach(function(a){g(a.plotX)&&g(a.plotY)&&a.marker.radius&&(c=a.marker.radius,e[0]=f(e[0],a.plotX-c),e[1]=b(e[1],a.plotX+c),e[2]=f(e[2],a.plotY-c),e[3]=b(e[3],a.plotY+c))});return H(e.width/e.height)?e:null};f.prototype.setVisible=function(){var a=this;k.prototype.setVisible.apply(a,arguments);a.parentNodeLayout&&a.graph?a.visible?(a.graph.show(),
|
||||
a.parentNode.dataLabel&&a.parentNode.dataLabel.show()):(a.graph.hide(),a.parentNodeLayout.removeElementFromCollection(a.parentNode,a.parentNodeLayout.nodes),a.parentNode.dataLabel&&a.parentNode.dataLabel.hide()):a.layout&&(a.visible?a.layout.addElementsToCollection(a.points,a.layout.nodes):a.points.forEach(function(b){a.layout.removeElementFromCollection(b,a.layout.nodes)}))};f.prototype.translate=function(){var a=this.chart,b=this.data,f=this.index,c,e=this.options.useSimulation;this.processedXData=
|
||||
this.xData;this.generatePoints();g(a.allDataPoints)||(a.allDataPoints=this.accumulateAllPoints(this),this.getPointRadius());if(e)var d=a.allDataPoints;else d=this.placeBubbles(a.allDataPoints),this.options.draggable=!1;for(c=0;c<d.length;c++)if(d[c][3]===f){var k=b[d[c][4]];var l=I(d[c][2],void 0);e||(k.plotX=d[c][0]-a.plotLeft+a.diffX,k.plotY=d[c][1]-a.plotTop+a.diffY);H(l)&&(k.marker=m(k.marker,{radius:l,width:2*l,height:2*l}),k.radius=l)}e&&this.deferLayout();n(this,"afterTranslate")};f.defaultOptions=
|
||||
A(x.defaultOptions,{minSize:"10%",maxSize:"50%",sizeBy:"area",zoneAxis:"y",crisp:!1,tooltip:{pointFormat:"Value: {point.value}"},draggable:!0,useSimulation:!0,parentNode:{allowPointSelect:!1},dataLabels:{formatter:function(){var a=this.series.chart.numberFormatter,b=this.point.value;return H(b)?a(b,-1):""},parentNodeFormatter:function(){return this.name},parentNodeTextPath:{enabled:!0},padding:0,style:{transition:"opacity 2000ms"}},layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:20,
|
||||
bubblePadding:5,parentNodeLimit:!1,seriesInteraction:!0,dragBetweenSeries:!1,parentNodeOptions:{maxIterations:400,gravitationalConstant:.03,maxSpeed:50,initialPositionRadius:100,seriesInteraction:!0,marker:{fillColor:null,fillOpacity:1,lineWidth:null,lineColor:null,symbol:"circle"}},enableSimulation:!0,type:"packedbubble",integration:"packedbubble",maxIterations:1E3,splitSeries:!1,maxSpeed:5,gravitationalConstant:.01,friction:-.981}});return f}(x);m(d.prototype,{alignDataLabel:k.prototype.alignDataLabel,
|
||||
axisTypes:[],directTouch:!0,forces:["barycenter","repulsive"],hasDraggableNodes:!0,isCartesian:!1,noSharedTooltip:!0,onMouseDown:y.onMouseDown,onMouseMove:y.onMouseMove,pointArrayMap:["value"],pointClass:l,pointValKey:"value",redrawHalo:y.redrawHalo,requireSorting:!1,searchPoint:e.noop,trackerGroups:["group","dataLabelsGroup","parentNodesGroup"]});a.registerSeriesType("packedbubble",d);"";"";return d});A(d,"Series/Polygon/PolygonSeries.js",[d["Core/Globals.js"],d["Core/Legend/LegendSymbol.js"],d["Core/Series/SeriesRegistry.js"],
|
||||
d["Core/Utilities.js"]],function(d,e,l,a){var c=this&&this.__extends||function(){var a=function(b,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return a(b,c)};return function(b,c){function e(){this.constructor=b}a(b,c);b.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)}}();d=d.noop;var t=l.series,p=l.seriesTypes,k=p.area,x=p.line,w=p.scatter;p=a.extend;var b=a.merge;a=function(a){function e(){var b=
|
||||
null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}c(e,a);e.prototype.getGraphPath=function(){for(var a=x.prototype.getGraphPath.call(this),b=a.length+1;b--;)(b===a.length||"M"===a[b][0])&&0<b&&a.splice(b,0,["Z"]);return this.areaPath=a};e.prototype.drawGraph=function(){this.options.fillColor=this.color;k.prototype.drawGraph.call(this)};e.defaultOptions=b(w.defaultOptions,{marker:{enabled:!1,states:{hover:{enabled:!1}}},stickyTracking:!1,tooltip:{followPointer:!0,
|
||||
pointFormat:""},trackByArea:!0});return e}(w);p(a.prototype,{type:"polygon",drawLegendSymbol:e.drawRectangle,drawTracker:t.prototype.drawTracker,setStackedPoints:d});l.registerSeriesType("polygon",a);"";return a});A(d,"Core/Axis/WaterfallAxis.js",[d["Extensions/Stacking.js"],d["Core/Utilities.js"]],function(d,e){var l=e.addEvent,a=e.objectEach,c;(function(c){function e(){var a=this.waterfall.stacks;a&&(a.changed=!1,delete a.alreadyChanged)}function k(){var a=this.options.stackLabels;a&&a.enabled&&
|
||||
this.waterfall.stacks&&this.waterfall.renderStackTotals()}function x(){for(var a=this.axes,b=this.series,c=b.length;c--;)b[c].options.stacking&&(a.forEach(function(a){a.isXAxis||(a.waterfall.stacks.changed=!0)}),c=0)}function w(){this.waterfall||(this.waterfall=new b(this))}var b=function(){function b(a){this.axis=a;this.stacks={changed:!1}}b.prototype.renderStackTotals=function(){var b=this.axis,c=b.waterfall.stacks,e=b.stacking&&b.stacking.stackTotalGroup,g=new d(b,b.options.stackLabels,!1,0,void 0);
|
||||
this.dummyStackItem=g;a(c,function(b){a(b,function(a){g.total=a.stackTotal;a.label&&(g.label=a.label);d.prototype.render.call(g,e);a.label=g.label;delete g.label})});g.total=null};return b}();c.Composition=b;c.compose=function(a,b){l(a,"init",w);l(a,"afterBuildStacks",e);l(a,"afterRender",k);l(b,"beforeRedraw",x)}})(c||(c={}));return c});A(d,"Series/Waterfall/WaterfallPoint.js",[d["Series/Column/ColumnSeries.js"],d["Core/Series/Point.js"],d["Core/Utilities.js"]],function(d,e,l){var a=this&&this.__extends||
|
||||
function(){var a=function(c,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b])};return a(c,e)};return function(c,e){function d(){this.constructor=c}a(c,e);c.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)}}(),c=l.isNumber;return function(d){function l(){var a=null!==d&&d.apply(this,arguments)||this;a.options=void 0;a.series=void 0;return a}a(l,d);l.prototype.getClassName=function(){var a=
|
||||
e.prototype.getClassName.call(this);this.isSum?a+=" highcharts-sum":this.isIntermediateSum&&(a+=" highcharts-intermediate-sum");return a};l.prototype.isValid=function(){return c(this.y)||this.isSum||!!this.isIntermediateSum};return l}(d.prototype.pointClass)});A(d,"Series/Waterfall/WaterfallSeries.js",[d["Core/Axis/Axis.js"],d["Core/Chart/Chart.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Utilities.js"],d["Core/Axis/WaterfallAxis.js"],d["Series/Waterfall/WaterfallPoint.js"]],function(d,e,l,a,c,
|
||||
t){var p=this&&this.__extends||function(){var a=function(b,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return a(b,c)};return function(b,c){function f(){this.constructor=b}a(b,c);b.prototype=null===c?Object.create(c):(f.prototype=c.prototype,new f)}}(),k=l.seriesTypes,x=k.column,w=k.line,b=a.arrayMax,g=a.arrayMin,m=a.correctFloat;k=a.extend;var n=a.isNumber,q=a.merge,A=a.objectEach,J=a.pick;
|
||||
a=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.chart=void 0;b.data=void 0;b.options=void 0;b.points=void 0;b.stackedYNeg=void 0;b.stackedYPos=void 0;b.stackKey=void 0;b.xData=void 0;b.yAxis=void 0;b.yData=void 0;return b}p(c,a);c.prototype.generatePoints=function(){var a;x.prototype.generatePoints.apply(this);var b=0;for(a=this.points.length;b<a;b++){var c=this.points[b];var e=this.processedYData[b];if(c.isIntermediateSum||c.isSum)c.y=m(e)}};c.prototype.translate=function(){var a=
|
||||
this.options,b=this.yAxis,c=J(a.minPointLength,5),e=c/2,d=a.threshold||0,g=d,k=d;a=a.stacking;var l=b.waterfall.stacks[this.stackKey];x.prototype.translate.apply(this);for(var m=this.points,p=0;p<m.length;p++){var q=m[p];var w=this.processedYData[p];var C=q.shapeArgs;if(C&&n(w)){var t=[0,w];var D=q.y;if(a){if(l){t=l[p];if("overlap"===a){var y=t.stackState[t.stateIndex--];y=0<=D?y:y-D;Object.hasOwnProperty.call(t,"absolutePos")&&delete t.absolutePos;Object.hasOwnProperty.call(t,"absoluteNeg")&&delete t.absoluteNeg}else 0<=
|
||||
D?(y=t.threshold+t.posTotal,t.posTotal-=D):(y=t.threshold+t.negTotal,t.negTotal-=D,y-=D),!t.posTotal&&Object.hasOwnProperty.call(t,"absolutePos")&&(t.posTotal=t.absolutePos,delete t.absolutePos),!t.negTotal&&Object.hasOwnProperty.call(t,"absoluteNeg")&&(t.negTotal=t.absoluteNeg,delete t.absoluteNeg);q.isSum||(t.connectorThreshold=t.threshold+t.stackTotal);b.reversed?(w=0<=D?y-D:y+D,D=y):(w=y,D=y-D);q.below=w<=d;C.y=b.translate(w,!1,!0,!1,!0)||0;C.height=Math.abs(C.y-(b.translate(D,!1,!0,!1,!0)||0));
|
||||
if(D=b.waterfall.dummyStackItem)D.x=p,D.label=l[p].label,D.setOffset(this.pointXOffset||0,this.barW||0,this.stackedYNeg[p],this.stackedYPos[p])}}else y=Math.max(g,g+D)+t[0],C.y=b.translate(y,!1,!0,!1,!0)||0,q.isSum?(C.y=b.translate(t[1],!1,!0,!1,!0)||0,C.height=Math.min(b.translate(t[0],!1,!0,!1,!0)||0,b.len)-C.y,q.below=t[1]<=d):q.isIntermediateSum?(0<=D?(w=t[1]+k,D=k):(w=k,D=t[1]+k),b.reversed&&(w^=D,D^=w,w^=D),C.y=b.translate(w,!1,!0,!1,!0)||0,C.height=Math.abs(C.y-Math.min(b.translate(D,!1,!0,
|
||||
!1,!0)||0,b.len)),k+=t[1],q.below=w<=d):(C.height=0<w?(b.translate(g,!1,!0,!1,!0)||0)-C.y:(b.translate(g,!1,!0,!1,!0)||0)-(b.translate(g-w,!1,!0,!1,!0)||0),g+=w,q.below=g<d),0>C.height&&(C.y+=C.height,C.height*=-1);q.plotY=C.y=Math.round(C.y||0)-this.borderWidth%2/2;C.height=Math.max(Math.round(C.height||0),.001);q.yBottom=C.y+C.height;C.height<=c&&!q.isNull?(C.height=c,C.y-=e,q.plotY=C.y,q.minPointLengthOffset=0>q.y?-e:e):(q.isNull&&(C.width=0),q.minPointLengthOffset=0);D=q.plotY+(q.negative?C.height:
|
||||
0);q.below&&(q.plotY+=C.height);q.tooltipPos&&(this.chart.inverted?q.tooltipPos[0]=b.len-D:q.tooltipPos[1]=D);q.isInside=this.isPointInside(q)}}};c.prototype.processData=function(b){var c=this.options,e=this.yData,d=c.data,g=e.length,k=c.threshold||0,l,n,p,q,t;for(t=n=l=p=q=0;t<g;t++){var z=e[t];var w=d&&d[t]?d[t]:{};"sum"===z||w.isSum?e[t]=m(n):"intermediateSum"===z||w.isIntermediateSum?(e[t]=m(l),l=0):(n+=z,l+=z);p=Math.min(n,p);q=Math.max(n,q)}a.prototype.processData.call(this,b);c.stacking||(this.dataMin=
|
||||
p+k,this.dataMax=q)};c.prototype.toYData=function(a){return a.isSum?"sum":a.isIntermediateSum?"intermediateSum":a.y};c.prototype.updateParallelArrays=function(b,c){a.prototype.updateParallelArrays.call(this,b,c);if("sum"===this.yData[0]||"intermediateSum"===this.yData[0])this.yData[0]=null};c.prototype.pointAttribs=function(a,b){var c=this.options.upColor;c&&!a.options.color&&(a.color=0<a.y?c:null);a=x.prototype.pointAttribs.call(this,a,b);delete a.dashstyle;return a};c.prototype.getGraphPath=function(){return[["M",
|
||||
0,0]]};c.prototype.getCrispPath=function(){var a=this.data,b=this.yAxis,c=a.length,e=Math.round(this.graph.strokeWidth())%2/2,d=Math.round(this.borderWidth)%2/2,g=this.xAxis.reversed,k=this.yAxis.reversed,l=this.options.stacking,m=[],n;for(n=1;n<c;n++){var p=a[n].shapeArgs;var q=a[n-1];var t=a[n-1].shapeArgs;var w=b.waterfall.stacks[this.stackKey];var x=0<q.y?-t.height:0;w&&t&&p&&(w=w[n-1],l?(w=w.connectorThreshold,x=Math.round(b.translate(w,0,1,0,1)+(k?x:0))-e):x=t.y+q.minPointLengthOffset+d-e,m.push(["M",
|
||||
(t.x||0)+(g?0:t.width||0),x],["L",(p.x||0)+(g?p.width||0:0),x]));t&&m.length&&(!l&&0>q.y&&!k||0<q.y&&k)&&((q=m[m.length-2])&&"number"===typeof q[2]&&(q[2]+=t.height||0),(q=m[m.length-1])&&"number"===typeof q[2]&&(q[2]+=t.height||0))}return m};c.prototype.drawGraph=function(){w.prototype.drawGraph.call(this);this.graph.attr({d:this.getCrispPath()})};c.prototype.setStackedPoints=function(){function a(a,b,c,f){if(J)for(c;c<J;c++)A.stackState[c]+=f;else A.stackState[0]=a,J=A.stackState.length;A.stackState.push(A.stackState[J-
|
||||
1]+b)}var b=this.options,c=this.yAxis.waterfall.stacks,e=b.threshold,d=e||0,g=d,k=this.stackKey,l=this.xData,m=l.length,n,p,q;this.yAxis.stacking.usePercentage=!1;var t=p=q=d;if(this.visible||!this.chart.options.chart.ignoreHiddenSeries){var w=c.changed;(n=c.alreadyChanged)&&0>n.indexOf(k)&&(w=!0);c[k]||(c[k]={});n=c[k];for(var x=0;x<m;x++){var y=l[x];if(!n[y]||w)n[y]={negTotal:0,posTotal:0,stackTotal:0,threshold:0,stateIndex:0,stackState:[],label:w&&n[y]?n[y].label:void 0};var A=n[y];var G=this.yData[x];
|
||||
0<=G?A.posTotal+=G:A.negTotal+=G;var F=b.data[x];y=A.absolutePos=A.posTotal;var H=A.absoluteNeg=A.negTotal;A.stackTotal=y+H;var J=A.stackState.length;F&&F.isIntermediateSum?(a(q,p,0,q),q=p,p=e,d^=g,g^=d,d^=g):F&&F.isSum?(a(e,t,J),d=e):(a(d,G,0,t),F&&(t+=G,p+=G));A.stateIndex++;A.threshold=d;d+=A.stackTotal}c.changed=!1;c.alreadyChanged||(c.alreadyChanged=[]);c.alreadyChanged.push(k)}};c.prototype.getExtremes=function(){var a=this.options.stacking;if(a){var c=this.yAxis;c=c.waterfall.stacks;var e=
|
||||
this.stackedYNeg=[];var d=this.stackedYPos=[];"overlap"===a?A(c[this.stackKey],function(a){e.push(g(a.stackState));d.push(b(a.stackState))}):A(c[this.stackKey],function(a){e.push(a.negTotal+a.threshold);d.push(a.posTotal+a.threshold)});return{dataMin:g(e),dataMax:b(d)}}return{dataMin:this.dataMin,dataMax:this.dataMax}};c.defaultOptions=q(x.defaultOptions,{dataLabels:{inside:!0},lineWidth:1,lineColor:"#333333",dashStyle:"Dot",borderColor:"#333333",states:{hover:{lineWidthPlus:0}}});return c}(x);k(a.prototype,
|
||||
{getZonesGraphs:w.prototype.getZonesGraphs,pointValKey:"y",showLine:!0,pointClass:t});l.registerSeriesType("waterfall",a);c.compose(d,e);"";return a});A(d,"Extensions/Polar.js",[d["Core/Animation/AnimationUtilities.js"],d["Core/Chart/Chart.js"],d["Core/Globals.js"],d["Extensions/Pane.js"],d["Core/Pointer.js"],d["Core/Series/Series.js"],d["Core/Series/SeriesRegistry.js"],d["Core/Renderer/SVG/SVGRenderer.js"],d["Core/Utilities.js"]],function(d,e,l,a,c,t,p,k,x){var w=d.animObject;p=p.seriesTypes;var b=
|
||||
x.addEvent,g=x.defined,m=x.find,n=x.isNumber,q=x.pick,A=x.splat,J=x.uniqueKey;d=x.wrap;var I=t.prototype;c=c.prototype;I.searchPointByAngle=function(a){var b=this.chart,c=this.xAxis.pane.center;return this.searchKDTree({clientX:180+-180/Math.PI*Math.atan2(a.chartX-c[0]-b.plotLeft,a.chartY-c[1]-b.plotTop)})};I.getConnectors=function(a,b,c,e){var f=e?1:0;var d=0<=b&&b<=a.length-1?b:0>b?a.length-1+b:0;b=0>d-1?a.length-(1+f):d-1;f=d+1>a.length-1?f:d+1;var g=a[b];f=a[f];var h=g.plotX;g=g.plotY;var k=f.plotX;
|
||||
var l=f.plotY;f=a[d].plotX;d=a[d].plotY;h=(1.5*f+h)/2.5;g=(1.5*d+g)/2.5;k=(1.5*f+k)/2.5;var r=(1.5*d+l)/2.5;l=Math.sqrt(Math.pow(h-f,2)+Math.pow(g-d,2));var n=Math.sqrt(Math.pow(k-f,2)+Math.pow(r-d,2));h=Math.atan2(g-d,h-f);r=Math.PI/2+(h+Math.atan2(r-d,k-f))/2;Math.abs(h-r)>Math.PI/2&&(r-=Math.PI);h=f+Math.cos(r)*l;g=d+Math.sin(r)*l;k=f+Math.cos(Math.PI+r)*n;r=d+Math.sin(Math.PI+r)*n;f={rightContX:k,rightContY:r,leftContX:h,leftContY:g,plotX:f,plotY:d};c&&(f.prevPointCont=this.getConnectors(a,b,
|
||||
!1,e));return f};I.toXY=function(a){var b=this.chart,c=this.xAxis,f=this.yAxis,d=a.plotX,e=a.plotY,g=a.series,k=b.inverted,l=a.y,m=k?d:f.len-e;k&&g&&!g.isRadialBar&&(a.plotY=e="number"===typeof l?f.translate(l)||0:0);a.rectPlotX=d;a.rectPlotY=e;f.center&&(m+=f.center[3]/2);n(e)&&(f=k?f.postTranslate(e,m):c.postTranslate(d,m),a.plotX=a.polarPlotX=f.x-b.plotLeft,a.plotY=a.polarPlotY=f.y-b.plotTop);this.kdByAngle?(b=(d/Math.PI*180+c.pane.options.startAngle)%360,0>b&&(b+=360),a.clientX=b):a.clientX=a.plotX};
|
||||
p.spline&&(d(p.spline.prototype,"getPointSpline",function(a,b,c,d){this.chart.polar?d?(a=this.getConnectors(b,d,!0,this.connectEnds),b=a.prevPointCont&&a.prevPointCont.rightContX,c=a.prevPointCont&&a.prevPointCont.rightContY,a=["C",n(b)?b:a.plotX,n(c)?c:a.plotY,n(a.leftContX)?a.leftContX:a.plotX,n(a.leftContY)?a.leftContY:a.plotY,a.plotX,a.plotY]):a=["M",c.plotX,c.plotY]:a=a.call(this,b,c,d);return a}),p.areasplinerange&&(p.areasplinerange.prototype.getPointSpline=p.spline.prototype.getPointSpline));
|
||||
b(t,"afterTranslate",function(){var a=this.chart;if(a.polar&&this.xAxis){(this.kdByAngle=a.tooltip&&a.tooltip.shared)?this.searchPoint=this.searchPointByAngle:this.options.findNearestPointBy="xy";if(!this.preventPostTranslate)for(var c=this.points,d=c.length;d--;)this.toXY(c[d]),!a.hasParallelCoordinates&&!this.yAxis.reversed&&c[d].y<this.yAxis.min&&(c[d].isNull=!0);this.hasClipCircleSetter||(this.hasClipCircleSetter=!!this.eventsToUnbind.push(b(this,"afterRender",function(){if(a.polar){var b=this.yAxis.pane.center;
|
||||
this.clipCircle?this.clipCircle.animate({x:b[0],y:b[1],r:b[2]/2,innerR:b[3]/2}):this.clipCircle=a.renderer.clipCircle(b[0],b[1],b[2]/2,b[3]/2);this.group.clip(this.clipCircle);this.setClip=l.noop}})))}},{order:2});d(p.line.prototype,"getGraphPath",function(a,b){var c=this,d;if(this.chart.polar){b=b||this.points;for(d=0;d<b.length;d++)if(!b[d].isNull){var e=d;break}if(!1!==this.options.connectEnds&&"undefined"!==typeof e){this.connectEnds=!0;b.splice(b.length,0,b[e]);var f=!0}b.forEach(function(a){"undefined"===
|
||||
typeof a.polarPlotY&&c.toXY(a)})}d=a.apply(this,[].slice.call(arguments,1));f&&b.pop();return d});var y=function(a,b){var c=this,d=this.chart,e=this.options.animation,f=this.group,g=this.markerGroup,h=this.xAxis&&this.xAxis.center,k=d.plotLeft,n=d.plotTop,m,p,t,x;if(d.polar)if(c.isRadialBar)b||(c.startAngleRad=q(c.translatedThreshold,c.xAxis.startAngleRad),l.seriesTypes.pie.prototype.animate.call(c,b));else{if(d.renderer.isSVG)if(e=w(e),c.is("column")){if(!b){var y=h[3]/2;c.points.forEach(function(a){m=
|
||||
a.graphic;t=(p=a.shapeArgs)&&p.r;x=p&&p.innerR;m&&p&&(m.attr({r:y,innerR:y}),m.animate({r:t,innerR:x},c.options.animation))})}}else b?(a={translateX:h[0]+k,translateY:h[1]+n,scaleX:.001,scaleY:.001},f.attr(a),g&&g.attr(a)):(a={translateX:k,translateY:n,scaleX:1,scaleY:1},f.animate(a,e),g&&g.animate(a,e))}else a.call(this,b)};d(I,"animate",y);if(p.column){var z=p.arearange.prototype;p=p.column.prototype;p.polarArc=function(a,b,c,d){var e=this.xAxis.center,f=this.yAxis.len,g=e[3]/2;b=f-b+g;a=f-q(a,
|
||||
f)+g;this.yAxis.reversed&&(0>b&&(b=g),0>a&&(a=g));return{x:e[0],y:e[1],r:b,innerR:a,start:c,end:d}};d(p,"animate",y);d(p,"translate",function(a){var b=this.options,c=b.stacking,d=this.chart,e=this.xAxis,f=this.yAxis,k=f.reversed,l=f.center,m=e.startAngleRad,p=e.endAngleRad-m;this.preventPostTranslate=!0;a.call(this);if(e.isRadial){a=this.points;e=a.length;var q=f.translate(f.min);var t=f.translate(f.max);b=b.threshold||0;if(d.inverted&&n(b)){var w=f.translate(b);g(w)&&(0>w?w=0:w>p&&(w=p),this.translatedThreshold=
|
||||
w+m)}for(;e--;){b=a[e];var y=b.barX;var z=b.x;var A=b.y;b.shapeType="arc";if(d.inverted){b.plotY=f.translate(A);if(c&&f.stacking){if(A=f.stacking.stacks[(0>A?"-":"")+this.stackKey],this.visible&&A&&A[z]&&!b.isNull){var G=A[z].points[this.getStackIndicator(void 0,z,this.index).key];var F=f.translate(G[0]);G=f.translate(G[1]);g(F)&&(F=x.clamp(F,0,p))}}else F=w,G=b.plotY;F>G&&(G=[F,F=G][0]);if(!k)if(F<q)F=q;else if(G>t)G=t;else{if(G<q||F>t)F=G=0}else if(G>q)G=q;else if(F<t)F=t;else if(F>q||G<t)F=G=p;
|
||||
f.min>f.max&&(F=G=k?p:0);F+=m;G+=m;l&&(b.barX=y+=l[3]/2);z=Math.max(y,0);A=Math.max(y+b.pointWidth,0);b.shapeArgs={x:l&&l[0],y:l&&l[1],r:A,innerR:z,start:F,end:G};b.opacity=F===G?0:void 0;b.plotY=(g(this.translatedThreshold)&&(F<this.translatedThreshold?F:G))-m}else F=y+m,b.shapeArgs=this.polarArc(b.yBottom,b.plotY,F,F+b.pointWidth);this.toXY(b);d.inverted?(y=f.postTranslate(b.rectPlotY,y+b.pointWidth/2),b.tooltipPos=[y.x-d.plotLeft,y.y-d.plotTop]):b.tooltipPos=[b.plotX,b.plotY];l&&(b.ttBelow=b.plotY>
|
||||
l[1])}}});p.findAlignments=function(a,b){null===b.align&&(b.align=20<a&&160>a?"left":200<a&&340>a?"right":"center");null===b.verticalAlign&&(b.verticalAlign=45>a||315<a?"bottom":135<a&&225>a?"top":"middle");return b};z&&(z.findAlignments=p.findAlignments);d(p,"alignDataLabel",function(a,b,c,d,e,g){var f=this.chart,h=q(d.inside,!!this.options.stacking);f.polar?(a=b.rectPlotX/Math.PI*180,f.inverted?(this.forceDL=f.isInsidePlot(b.plotX,Math.round(b.plotY)),h&&b.shapeArgs?(e=b.shapeArgs,e=this.yAxis.postTranslate(((e.start||
|
||||
0)+(e.end||0))/2-this.xAxis.startAngleRad,b.barX+b.pointWidth/2),e={x:e.x-f.plotLeft,y:e.y-f.plotTop}):b.tooltipPos&&(e={x:b.tooltipPos[0],y:b.tooltipPos[1]}),d.align=q(d.align,"center"),d.verticalAlign=q(d.verticalAlign,"middle")):this.findAlignments&&(d=this.findAlignments(a,d)),I.alignDataLabel.call(this,b,c,d,e,g),this.isRadialBar&&b.shapeArgs&&b.shapeArgs.start===b.shapeArgs.end&&c.hide(!0)):a.call(this,b,c,d,e,g)})}d(c,"getCoordinates",function(a,b){var c=this.chart,d={xAxis:[],yAxis:[]};c.polar?
|
||||
c.axes.forEach(function(a){var e=a.isXAxis,f=a.center;if("colorAxis"!==a.coll){var g=b.chartX-f[0]-c.plotLeft;f=b.chartY-f[1]-c.plotTop;d[e?"xAxis":"yAxis"].push({axis:a,value:a.translate(e?Math.PI-Math.atan2(g,f):Math.sqrt(Math.pow(g,2)+Math.pow(f,2)),!0)})}}):d=a.call(this,b);return d});k.prototype.clipCircle=function(a,b,c,d){var e=J(),f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=d?this.arc(a,b,c,d,0,2*Math.PI).add(f):this.circle(a,b,c).add(f);a.id=e;a.clipPath=f;return a};b(e,
|
||||
"getAxes",function(){this.pane||(this.pane=[]);this.options.pane=A(this.options.pane);this.options.pane.forEach(function(b){new a(b,this)},this)});b(e,"afterDrawChartBox",function(){this.pane.forEach(function(a){a.render()})});b(t,"afterInit",function(){var a=this.chart;a.inverted&&a.polar&&(this.isRadialSeries=!0,this.is("column")&&(this.isRadialBar=!0))});d(e.prototype,"get",function(a,b){return m(this.pane||[],function(a){return a.options.id===b})||a.call(this,b)})});A(d,"masters/highcharts-more.src.js",
|
||||
[d["Core/Globals.js"],d["Core/Axis/RadialAxis.js"],d["Series/Bubble/BubbleSeries.js"]],function(d,e,l){e.compose(d.Axis,d.Tick);l.compose(d.Chart,d.Legend,d.Series)})});
|
||||
//# sourceMappingURL=highcharts-more.js.map
|
||||
@@ -0,0 +1,598 @@
|
||||
/*
|
||||
Highcharts JS v10.0.0 (2022-03-07)
|
||||
|
||||
(c) 2009-2021 Torstein Honsi
|
||||
|
||||
License: www.highcharts.com/license
|
||||
*/
|
||||
(function(Y,M){"object"===typeof module&&module.exports?(M["default"]=M,module.exports=Y.document?M(Y):M):"function"===typeof define&&define.amd?define("highcharts/highcharts",function(){return M(Y)}):(Y.Highcharts&&Y.Highcharts.error(16,!0),Y.Highcharts=M(Y))})("undefined"!==typeof window?window:this,function(Y){function M(a,F,f,G){a.hasOwnProperty(F)||(a[F]=G.apply(null,f),"function"===typeof CustomEvent&&Y.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:F,module:a[F]}})))}
|
||||
var f={};M(f,"Core/Globals.js",[],function(){var a;(function(a){a.SVG_NS="http://www.w3.org/2000/svg";a.product="Highcharts";a.version="10.0.0";a.win="undefined"!==typeof Y?Y:{};a.doc=a.win.document;a.svg=a.doc&&a.doc.createElementNS&&!!a.doc.createElementNS(a.SVG_NS,"svg").createSVGRect;a.userAgent=a.win.navigator&&a.win.navigator.userAgent||"";a.isChrome=-1!==a.userAgent.indexOf("Chrome");a.isFirefox=-1!==a.userAgent.indexOf("Firefox");a.isMS=/(edge|msie|trident)/i.test(a.userAgent)&&!a.win.opera;
|
||||
a.isSafari=!a.isChrome&&-1!==a.userAgent.indexOf("Safari");a.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(a.userAgent);a.isWebKit=-1!==a.userAgent.indexOf("AppleWebKit");a.deg2rad=2*Math.PI/360;a.hasBidiBug=a.isFirefox&&4>parseInt(a.userAgent.split("Firefox/")[1],10);a.hasTouch=!!a.win.TouchEvent;a.marginNames=["plotTop","marginRight","marginBottom","plotLeft"];a.noop=function(){};a.supportsPassiveEvents=function(){var f=!1;if(!a.isMS){var F=Object.defineProperty({},"passive",{get:function(){f=
|
||||
!0}});a.win.addEventListener&&a.win.removeEventListener&&(a.win.addEventListener("testPassive",a.noop,F),a.win.removeEventListener("testPassive",a.noop,F))}return f}();a.charts=[];a.dateFormats={};a.seriesTypes={};a.symbolSizes={};a.chartCount=0})(a||(a={}));"";return a});M(f,"Core/Utilities.js",[f["Core/Globals.js"]],function(a){function f(r,b,c,g){var x=b?"Highcharts error":"Highcharts warning";32===r&&(r=x+": Deprecated member");var D=p(r),q=D?x+" #"+r+": www.highcharts.com/errors/"+r+"/":r.toString();
|
||||
if("undefined"!==typeof g){var d="";D&&(q+="?");v(g,function(b,r){d+="\n - "+r+": "+b;D&&(q+=encodeURI(r)+"="+encodeURI(b))});q+=d}y(a,"displayError",{chart:c,code:r,message:q,params:g},function(){if(b)throw Error(q);k.console&&-1===f.messages.indexOf(q)&&console.warn(q)});f.messages.push(q)}function C(b,c){var r={};v(b,function(x,g){if(I(b[g],!0)&&!b.nodeType&&c[g])x=C(b[g],c[g]),Object.keys(x).length&&(r[g]=x);else if(I(b[g])||b[g]!==c[g]||g in b&&!(g in c))r[g]=b[g]});return r}function G(b,c){return parseInt(b,
|
||||
c||10)}function u(b){return"string"===typeof b}function H(b){b=Object.prototype.toString.call(b);return"[object Array]"===b||"[object Array Iterator]"===b}function I(b,c){return!!b&&"object"===typeof b&&(!c||!H(b))}function B(b){return I(b)&&"number"===typeof b.nodeType}function z(b){var c=b&&b.constructor;return!(!I(b,!0)||B(b)||!c||!c.name||"Object"===c.name)}function p(b){return"number"===typeof b&&!isNaN(b)&&Infinity>b&&-Infinity<b}function m(b){return"undefined"!==typeof b&&null!==b}function e(b,
|
||||
c,g){var r=u(c)&&!m(g),x,D=function(c,g){m(c)?b.setAttribute(g,c):r?(x=b.getAttribute(g))||"class"!==g||(x=b.getAttribute(g+"Name")):b.removeAttribute(g)};u(c)?D(g,c):v(c,D);return x}function d(b,c){var r;b||(b={});for(r in c)b[r]=c[r];return b}function l(){for(var b=arguments,c=b.length,g=0;g<c;g++){var k=b[g];if("undefined"!==typeof k&&null!==k)return k}}function h(b,c){a.isMS&&!a.svg&&c&&m(c.opacity)&&(c.filter="alpha(opacity="+100*c.opacity+")");d(b.style,c)}function t(b,c){return 1E14<b?b:parseFloat(b.toPrecision(c||
|
||||
14))}function n(b,c,g){var r=a.getStyle||n;if("width"===c)return c=Math.min(b.offsetWidth,b.scrollWidth),g=b.getBoundingClientRect&&b.getBoundingClientRect().width,g<c&&g>=c-1&&(c=Math.floor(g)),Math.max(0,c-(r(b,"padding-left",!0)||0)-(r(b,"padding-right",!0)||0));if("height"===c)return Math.max(0,Math.min(b.offsetHeight,b.scrollHeight)-(r(b,"padding-top",!0)||0)-(r(b,"padding-bottom",!0)||0));k.getComputedStyle||f(27,!0);if(b=k.getComputedStyle(b,void 0)){var x=b.getPropertyValue(c);l(g,"opacity"!==
|
||||
c)&&(x=G(x))}return x}function v(b,c,g){for(var r in b)Object.hasOwnProperty.call(b,r)&&c.call(g||b[r],b[r],r,b)}function w(b,c,g){function r(c,r){var L=b.removeEventListener||a.removeEventListenerPolyfill;L&&L.call(b,c,r,!1)}function x(g){var x;if(b.nodeName){if(c){var L={};L[c]=!0}else L=g;v(L,function(b,c){if(g[c])for(x=g[c].length;x--;)r(c,g[c][x].fn)})}}var k="function"===typeof b&&b.prototype||b;if(Object.hasOwnProperty.call(k,"hcEvents")){var D=k.hcEvents;c?(k=D[c]||[],g?(D[c]=k.filter(function(b){return g!==
|
||||
b.fn}),r(c,g)):(x(D),D[c]=[])):(x(D),delete k.hcEvents)}}function y(b,c,g,k){g=g||{};if(q.createEvent&&(b.dispatchEvent||b.fireEvent&&b!==a)){var r=q.createEvent("Events");r.initEvent(c,!0,!0);g=d(r,g);b.dispatchEvent?b.dispatchEvent(g):b.fireEvent(c,g)}else if(b.hcEvents){g.target||d(g,{preventDefault:function(){g.defaultPrevented=!0},target:b,type:c});r=[];for(var x=b,D=!1;x.hcEvents;)Object.hasOwnProperty.call(x,"hcEvents")&&x.hcEvents[c]&&(r.length&&(D=!0),r.unshift.apply(r,x.hcEvents[c])),x=
|
||||
Object.getPrototypeOf(x);D&&r.sort(function(b,c){return b.order-c.order});r.forEach(function(c){!1===c.fn.call(b,g)&&g.preventDefault()})}k&&!g.defaultPrevented&&k.call(b,g)}var A=a.charts,q=a.doc,k=a.win;(f||(f={})).messages=[];Math.easeInOutSine=function(b){return-.5*(Math.cos(Math.PI*b)-1)};var c=Array.prototype.find?function(b,c){return b.find(c)}:function(b,c){var r,g=b.length;for(r=0;r<g;r++)if(c(b[r],r))return b[r]};v({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(b,
|
||||
c){a[c]=function(r){var g;f(32,!1,void 0,(g={},g["Highcharts."+c]="use Array."+b,g));return Array.prototype[b].apply(r,[].slice.call(arguments,1))}});var g,b=function(){var b=Math.random().toString(36).substring(2,9)+"-",c=0;return function(){return"highcharts-"+(g?"":b)+c++}}();k.jQuery&&(k.jQuery.fn.highcharts=function(){var b=[].slice.call(arguments);if(this[0])return b[0]?(new (a[u(b[0])?b.shift():"Chart"])(this[0],b[0],b[1]),this):A[e(this[0],"data-highcharts-chart")]});c={addEvent:function(b,
|
||||
c,g,k){void 0===k&&(k={});var r="function"===typeof b&&b.prototype||b;Object.hasOwnProperty.call(r,"hcEvents")||(r.hcEvents={});r=r.hcEvents;a.Point&&b instanceof a.Point&&b.series&&b.series.chart&&(b.series.chart.runTrackerClick=!0);var x=b.addEventListener||a.addEventListenerPolyfill;x&&x.call(b,c,g,a.supportsPassiveEvents?{passive:void 0===k.passive?-1!==c.indexOf("touch"):k.passive,capture:!1}:!1);r[c]||(r[c]=[]);r[c].push({fn:g,order:"number"===typeof k.order?k.order:Infinity});r[c].sort(function(b,
|
||||
c){return b.order-c.order});return function(){w(b,c,g)}},arrayMax:function(b){for(var c=b.length,g=b[0];c--;)b[c]>g&&(g=b[c]);return g},arrayMin:function(b){for(var c=b.length,g=b[0];c--;)b[c]<g&&(g=b[c]);return g},attr:e,clamp:function(b,c,g){return b>c?b<g?b:g:c},cleanRecursively:C,clearTimeout:function(b){m(b)&&clearTimeout(b)},correctFloat:t,createElement:function(b,c,g,k,n){b=q.createElement(b);c&&d(b,c);n&&h(b,{padding:"0",border:"none",margin:"0"});g&&h(b,g);k&&k.appendChild(b);return b},css:h,
|
||||
defined:m,destroyObjectProperties:function(b,c){v(b,function(g,r){g&&g!==c&&g.destroy&&g.destroy();delete b[r]})},discardElement:function(b){b&&b.parentElement&&b.parentElement.removeChild(b)},erase:function(b,c){for(var g=b.length;g--;)if(b[g]===c){b.splice(g,1);break}},error:f,extend:d,extendClass:function(b,c){var g=function(){};g.prototype=new b;d(g.prototype,c);return g},find:c,fireEvent:y,getMagnitude:function(b){return Math.pow(10,Math.floor(Math.log(b)/Math.LN10))},getNestedProperty:function(b,
|
||||
c){for(b=b.split(".");b.length&&m(c);){var g=b.shift();if("undefined"===typeof g||"__proto__"===g)return;c=c[g];if(!m(c)||"function"===typeof c||"number"===typeof c.nodeType||c===k)return}return c},getStyle:n,inArray:function(b,c,g){f(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"});return c.indexOf(b,g)},isArray:H,isClass:z,isDOMElement:B,isFunction:function(b){return"function"===typeof b},isNumber:p,isObject:I,isString:u,keys:function(b){f(32,!1,void 0,{"Highcharts.keys":"use Object.keys"});
|
||||
return Object.keys(b)},merge:function(){var b,c=arguments,g={},k=function(b,c){"object"!==typeof b&&(b={});v(c,function(g,r){"__proto__"!==r&&"constructor"!==r&&(!I(g,!0)||z(g)||B(g)?b[r]=c[r]:b[r]=k(b[r]||{},g))});return b};!0===c[0]&&(g=c[1],c=Array.prototype.slice.call(c,2));var q=c.length;for(b=0;b<q;b++)g=k(g,c[b]);return g},normalizeTickInterval:function(b,c,g,k,q){var r=b;g=l(g,1);var d=b/g;c||(c=q?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===k&&(1===g?c=c.filter(function(b){return 0===
|
||||
b%1}):.1>=g&&(c=[1/g])));for(k=0;k<c.length&&!(r=c[k],q&&r*g>=b||!q&&d<=(c[k]+(c[k+1]||c[k]))/2);k++);return r=t(r*g,-Math.round(Math.log(.001)/Math.LN10))},objectEach:v,offset:function(b){var c=q.documentElement;b=b.parentElement||b.parentNode?b.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:b.top+(k.pageYOffset||c.scrollTop)-(c.clientTop||0),left:b.left+(k.pageXOffset||c.scrollLeft)-(c.clientLeft||0),width:b.width,height:b.height}},pad:function(b,c,g){return Array((c||2)+1-String(b).replace("-",
|
||||
"").length).join(g||"0")+b},pick:l,pInt:G,relativeLength:function(b,c,g){return/%$/.test(b)?c*parseFloat(b)/100+(g||0):parseFloat(b)},removeEvent:w,splat:function(b){return H(b)?b:[b]},stableSort:function(b,c){var g=b.length,k,r;for(r=0;r<g;r++)b[r].safeI=r;b.sort(function(b,g){k=c(b,g);return 0===k?b.safeI-g.safeI:k});for(r=0;r<g;r++)delete b[r].safeI},syncTimeout:function(b,c,g){if(0<c)return setTimeout(b,c,g);b.call(0,g);return-1},timeUnits:{millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,
|
||||
week:6048E5,month:24192E5,year:314496E5},uniqueKey:b,useSerialIds:function(b){return g=l(b,g)},wrap:function(b,c,g){var k=b[c];b[c]=function(){var b=Array.prototype.slice.call(arguments),c=arguments,r=this;r.proceed=function(){k.apply(r,arguments.length?arguments:c)};b.unshift(k);b=g.apply(this,b);r.proceed=null;return b}}};"";return c});M(f,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,defaultSeriesType:"line",
|
||||
ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},zoomBySingleTouch:!1,width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}});M(f,"Core/Color/Color.js",[f["Core/Globals.js"],f["Core/Utilities.js"]],function(a,f){var F=f.isNumber,G=f.merge,u=f.pInt;f=function(){function f(F){this.rgba=[NaN,NaN,NaN,NaN];this.input=F;var B=a.Color;if(B&&B!==f)return new B(F);if(!(this instanceof f))return new f(F);
|
||||
this.init(F)}f.parse=function(a){return a?new f(a):f.None};f.prototype.init=function(a){var B;if("object"===typeof a&&"undefined"!==typeof a.stops)this.stops=a.stops.map(function(e){return new f(e[1])});else if("string"===typeof a){this.input=a=f.names[a.toLowerCase()]||a;if("#"===a.charAt(0)){var z=a.length;var p=parseInt(a.substr(1),16);7===z?B=[(p&16711680)>>16,(p&65280)>>8,p&255,1]:4===z&&(B=[(p&3840)>>4|(p&3840)>>8,(p&240)>>4|p&240,(p&15)<<4|p&15,1])}if(!B)for(p=f.parsers.length;p--&&!B;){var m=
|
||||
f.parsers[p];(z=m.regex.exec(a))&&(B=m.parse(z))}}B&&(this.rgba=B)};f.prototype.get=function(a){var B=this.input,z=this.rgba;if("object"===typeof B&&"undefined"!==typeof this.stops){var p=G(B);p.stops=[].slice.call(p.stops);this.stops.forEach(function(m,e){p.stops[e]=[p.stops[e][0],m.get(a)]});return p}return z&&F(z[0])?"rgb"===a||!a&&1===z[3]?"rgb("+z[0]+","+z[1]+","+z[2]+")":"a"===a?""+z[3]:"rgba("+z.join(",")+")":B};f.prototype.brighten=function(a){var B=this.rgba;if(this.stops)this.stops.forEach(function(p){p.brighten(a)});
|
||||
else if(F(a)&&0!==a)for(var z=0;3>z;z++)B[z]+=u(255*a),0>B[z]&&(B[z]=0),255<B[z]&&(B[z]=255);return this};f.prototype.setOpacity=function(a){this.rgba[3]=a;return this};f.prototype.tweenTo=function(a,B){var z=this.rgba,p=a.rgba;if(!F(z[0])||!F(p[0]))return a.input||"none";a=1!==p[3]||1!==z[3];return(a?"rgba(":"rgb(")+Math.round(p[0]+(z[0]-p[0])*(1-B))+","+Math.round(p[1]+(z[1]-p[1])*(1-B))+","+Math.round(p[2]+(z[2]-p[2])*(1-B))+(a?","+(p[3]+(z[3]-p[3])*(1-B)):"")+")"};f.names={white:"#ffffff",black:"#000000"};
|
||||
f.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[u(a[1]),u(a[2]),u(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[u(a[1]),u(a[2]),u(a[3]),1]}}];f.None=new f("");return f}();"";return f});M(f,"Core/Color/Palettes.js",[],function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ")}});
|
||||
M(f,"Core/Time.js",[f["Core/Globals.js"],f["Core/Utilities.js"]],function(a,f){var F=a.win,G=f.defined,u=f.error,H=f.extend,I=f.isObject,B=f.merge,z=f.objectEach,p=f.pad,m=f.pick,e=f.splat,d=f.timeUnits,l=a.isSafari&&F.Intl&&F.Intl.DateTimeFormat.prototype.formatRange,h=a.isSafari&&F.Intl&&!F.Intl.DateTimeFormat.prototype.formatRange;f=function(){function t(d){this.options={};this.variableTimezone=this.useUTC=!1;this.Date=F.Date;this.getTimezoneOffset=this.timezoneOffsetFunction();this.update(d)}
|
||||
t.prototype.get=function(d,e){if(this.variableTimezone||this.timezoneOffset){var n=e.getTime(),l=n-this.getTimezoneOffset(e);e.setTime(l);d=e["getUTC"+d]();e.setTime(n);return d}return this.useUTC?e["getUTC"+d]():e["get"+d]()};t.prototype.set=function(d,e,h){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===d||"Seconds"===d||"Minutes"===d&&0===this.getTimezoneOffset(e)%36E5)return e["setUTC"+d](h);var n=this.getTimezoneOffset(e);n=e.getTime()-n;e.setTime(n);e["setUTC"+d](h);d=this.getTimezoneOffset(e);
|
||||
n=e.getTime()+d;return e.setTime(n)}return this.useUTC||l&&"FullYear"===d?e["setUTC"+d](h):e["set"+d](h)};t.prototype.update=function(d){var e=m(d&&d.useUTC,!0);this.options=d=B(!0,this.options||{},d);this.Date=d.Date||F.Date||Date;this.timezoneOffset=(this.useUTC=e)&&d.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();this.variableTimezone=e&&!(!d.getTimezoneOffset&&!d.timezone)};t.prototype.makeTime=function(d,e,l,t,A,q){if(this.useUTC){var k=this.Date.UTC.apply(0,arguments);var c=
|
||||
this.getTimezoneOffset(k);k+=c;var g=this.getTimezoneOffset(k);c!==g?k+=g-c:c-36E5!==this.getTimezoneOffset(k-36E5)||h||(k-=36E5)}else k=(new this.Date(d,e,m(l,1),m(t,0),m(A,0),m(q,0))).getTime();return k};t.prototype.timezoneOffsetFunction=function(){var d=this,e=this.options,l=e.getTimezoneOffset,h=e.moment||F.moment;if(!this.useUTC)return function(d){return 6E4*(new Date(d.toString())).getTimezoneOffset()};if(e.timezone){if(h)return function(d){return 6E4*-h.tz(d,e.timezone).utcOffset()};u(25)}return this.useUTC&&
|
||||
l?function(d){return 6E4*l(d.valueOf())}:function(){return 6E4*(d.timezoneOffset||0)}};t.prototype.dateFormat=function(d,e,l){if(!G(e)||isNaN(e))return a.defaultOptions.lang&&a.defaultOptions.lang.invalidDate||"";d=m(d,"%Y-%m-%d %H:%M:%S");var h=this,n=new this.Date(e),q=this.get("Hours",n),k=this.get("Day",n),c=this.get("Date",n),g=this.get("Month",n),b=this.get("FullYear",n),r=a.defaultOptions.lang,x=r&&r.weekdays,D=r&&r.shortWeekdays;n=H({a:D?D[k]:x[k].substr(0,3),A:x[k],d:p(c),e:p(c,2," "),w:k,
|
||||
b:r.shortMonths[g],B:r.months[g],m:p(g+1),o:g+1,y:b.toString().substr(2,2),Y:b,H:p(q),k:q,I:p(q%12||12),l:q%12||12,M:p(this.get("Minutes",n)),p:12>q?"AM":"PM",P:12>q?"am":"pm",S:p(n.getSeconds()),L:p(Math.floor(e%1E3),3)},a.dateFormats);z(n,function(b,c){for(;-1!==d.indexOf("%"+c);)d=d.replace("%"+c,"function"===typeof b?b.call(h,e):b)});return l?d.substr(0,1).toUpperCase()+d.substr(1):d};t.prototype.resolveDTLFormat=function(d){return I(d,!0)?d:(d=e(d),{main:d[0],from:d[1],to:d[2]})};t.prototype.getTimeTicks=
|
||||
function(e,l,h,t){var n=this,q=[],k={},c=new n.Date(l),g=e.unitRange,b=e.count||1,r;t=m(t,1);if(G(l)){n.set("Milliseconds",c,g>=d.second?0:b*Math.floor(n.get("Milliseconds",c)/b));g>=d.second&&n.set("Seconds",c,g>=d.minute?0:b*Math.floor(n.get("Seconds",c)/b));g>=d.minute&&n.set("Minutes",c,g>=d.hour?0:b*Math.floor(n.get("Minutes",c)/b));g>=d.hour&&n.set("Hours",c,g>=d.day?0:b*Math.floor(n.get("Hours",c)/b));g>=d.day&&n.set("Date",c,g>=d.month?1:Math.max(1,b*Math.floor(n.get("Date",c)/b)));if(g>=
|
||||
d.month){n.set("Month",c,g>=d.year?0:b*Math.floor(n.get("Month",c)/b));var x=n.get("FullYear",c)}g>=d.year&&n.set("FullYear",c,x-x%b);g===d.week&&(x=n.get("Day",c),n.set("Date",c,n.get("Date",c)-x+t+(x<t?-7:0)));x=n.get("FullYear",c);t=n.get("Month",c);var D=n.get("Date",c),y=n.get("Hours",c);l=c.getTime();!n.variableTimezone&&n.useUTC||!G(h)||(r=h-l>4*d.month||n.getTimezoneOffset(l)!==n.getTimezoneOffset(h));l=c.getTime();for(c=1;l<h;)q.push(l),l=g===d.year?n.makeTime(x+c*b,0):g===d.month?n.makeTime(x,
|
||||
t+c*b):!r||g!==d.day&&g!==d.week?r&&g===d.hour&&1<b?n.makeTime(x,t,D,y+c*b):l+g*b:n.makeTime(x,t,D+c*b*(g===d.day?1:7)),c++;q.push(l);g<=d.hour&&1E4>q.length&&q.forEach(function(b){0===b%18E5&&"000000000"===n.dateFormat("%H%M%S%L",b)&&(k[b]="day")})}q.info=H(e,{higherRanks:k,totalRange:g*b});return q};t.prototype.getDateFormat=function(e,l,h,t){var n=this.dateFormat("%m-%d %H:%M:%S.%L",l),q={millisecond:15,second:12,minute:9,hour:6,day:3},k="millisecond";for(c in d){if(e===d.week&&+this.dateFormat("%w",
|
||||
l)===h&&"00:00:00.000"===n.substr(6)){var c="week";break}if(d[c]>e){c=k;break}if(q[c]&&n.substr(q[c])!=="01-01 00:00:00.000".substr(q[c]))break;"week"!==c&&(k=c)}if(c)var g=this.resolveDTLFormat(t[c]).main;return g};return t}();"";return f});M(f,"Core/DefaultOptions.js",[f["Core/Chart/ChartDefaults.js"],f["Core/Color/Color.js"],f["Core/Globals.js"],f["Core/Color/Palettes.js"],f["Core/Time.js"],f["Core/Utilities.js"]],function(a,f,C,G,u,H){f=f.parse;var F=H.merge,B={colors:G.colors,symbols:["circle",
|
||||
"diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,
|
||||
timezone:void 0,timezoneOffset:0,useUTC:!0},chart:a,title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",
|
||||
inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,
|
||||
textAlign:"center"}},tooltip:{enabled:!0,animation:C.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:C.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',
|
||||
backgroundColor:f("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"12px",whiteSpace:"nowrap"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};B.chart.styledMode=!1;"";var z=new u(F(B.global,B.time));a={defaultOptions:B,defaultTime:z,getOptions:function(){return B},
|
||||
setOptions:function(p){F(!0,B,p);if(p.time||p.global)C.time?C.time.update(F(B.global,B.time,p.global,p.time)):C.time=z;return B}};"";return a});M(f,"Core/Animation/Fx.js",[f["Core/Color/Color.js"],f["Core/Globals.js"],f["Core/Utilities.js"]],function(a,f,C){var F=a.parse,u=f.win,H=C.isNumber,I=C.objectEach;return function(){function a(a,p,m){this.pos=NaN;this.options=p;this.elem=a;this.prop=m}a.prototype.dSetter=function(){var a=this.paths,p=a&&a[0];a=a&&a[1];var m=this.now||0,e=[];if(1!==m&&p&&a)if(p.length===
|
||||
a.length&&1>m)for(var d=0;d<a.length;d++){for(var l=p[d],h=a[d],t=[],n=0;n<h.length;n++){var v=l[n],w=h[n];H(v)&&H(w)&&("A"!==h[0]||4!==n&&5!==n)?t[n]=v+m*(w-v):t[n]=w}e.push(t)}else e=a;else e=this.toD||[];this.elem.attr("d",e,void 0,!0)};a.prototype.update=function(){var a=this.elem,p=this.prop,m=this.now,e=this.options.step;if(this[p+"Setter"])this[p+"Setter"]();else a.attr?a.element&&a.attr(p,m,null,!0):a.style[p]=m+this.unit;e&&e.call(a,m,this)};a.prototype.run=function(z,p,m){var e=this,d=e.options,
|
||||
l=function(d){return l.stopped?!1:e.step(d)},h=u.requestAnimationFrame||function(d){setTimeout(d,13)},t=function(){for(var d=0;d<a.timers.length;d++)a.timers[d]()||a.timers.splice(d--,1);a.timers.length&&h(t)};z!==p||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=z,this.end=p,this.unit=m,this.now=this.start,this.pos=0,l.elem=this.elem,l.prop=this.prop,l()&&1===a.timers.push(l)&&h(t)):(delete d.curAnim[this.prop],d.complete&&0===Object.keys(d.curAnim).length&&d.complete.call(this.elem))};
|
||||
a.prototype.step=function(a){var p=+new Date,m=this.options,e=this.elem,d=m.complete,l=m.duration,h=m.curAnim;if(e.attr&&!e.element)a=!1;else if(a||p>=l+this.startTime){this.now=this.end;this.pos=1;this.update();var t=h[this.prop]=!0;I(h,function(d){!0!==d&&(t=!1)});t&&d&&d.call(e);a=!1}else this.pos=m.easing((p-this.startTime)/l),this.now=this.start+(this.end-this.start)*this.pos,this.update(),a=!0;return a};a.prototype.initPath=function(a,p,m){function e(d,q){for(;d.length<y;){var k=d[0],c=q[y-
|
||||
d.length];c&&"M"===k[0]&&(d[0]="C"===c[0]?["C",k[1],k[2],k[1],k[2],k[1],k[2]]:["L",k[1],k[2]]);d.unshift(k);t&&(k=d.pop(),d.push(d[d.length-1],k))}}function d(d,q){for(;d.length<y;)if(q=d[Math.floor(d.length/n)-1].slice(),"C"===q[0]&&(q[1]=q[5],q[2]=q[6]),t){var k=d[Math.floor(d.length/n)].slice();d.splice(d.length/2,0,q,k)}else d.push(q)}var l=a.startX,h=a.endX;m=m.slice();var t=a.isArea,n=t?2:1;p=p&&p.slice();if(!p)return[m,m];if(l&&h&&h.length){for(a=0;a<l.length;a++)if(l[a]===h[0]){var v=a;break}else if(l[0]===
|
||||
h[h.length-l.length+a]){v=a;var w=!0;break}else if(l[l.length-1]===h[h.length-l.length+a]){v=l.length-a;break}"undefined"===typeof v&&(p=[])}if(p.length&&H(v)){var y=m.length+v*n;w?(e(p,m),d(m,p)):(e(m,p),d(p,m))}return[p,m]};a.prototype.fillSetter=function(){a.prototype.strokeSetter.apply(this,arguments)};a.prototype.strokeSetter=function(){this.elem.attr(this.prop,F(this.start).tweenTo(F(this.end),this.pos),void 0,!0)};a.timers=[];return a}()});M(f,"Core/Animation/AnimationUtilities.js",[f["Core/Animation/Fx.js"],
|
||||
f["Core/Utilities.js"]],function(a,f){function F(d){return z(d)?p({duration:500,defer:0},d):{duration:d?500:0,defer:0}}function G(d,e){for(var l=a.timers.length;l--;)a.timers[l].elem!==d||e&&e!==a.timers[l].prop||(a.timers[l].stopped=!0)}var u=f.defined,H=f.getStyle,I=f.isArray,B=f.isNumber,z=f.isObject,p=f.merge,m=f.objectEach,e=f.pick;return{animate:function(d,e,h){var l,n="",v,w;if(!z(h)){var y=arguments;h={duration:y[2],easing:y[3],complete:y[4]}}B(h.duration)||(h.duration=400);h.easing="function"===
|
||||
typeof h.easing?h.easing:Math[h.easing]||Math.easeInOutSine;h.curAnim=p(e);m(e,function(t,q){G(d,q);w=new a(d,h,q);v=void 0;"d"===q&&I(e.d)?(w.paths=w.initPath(d,d.pathArray,e.d),w.toD=e.d,l=0,v=1):d.attr?l=d.attr(q):(l=parseFloat(H(d,q))||0,"opacity"!==q&&(n="px"));v||(v=t);"string"===typeof v&&v.match("px")&&(v=v.replace(/px/g,""));w.run(l,v,n)})},animObject:F,getDeferredAnimation:function(d,e,h){var l=F(e),n=0,a=0;(h?[h]:d.series).forEach(function(d){d=F(d.options.animation);n=e&&u(e.defer)?l.defer:
|
||||
Math.max(n,d.duration+d.defer);a=Math.min(l.duration,d.duration)});d.renderer.forExport&&(n=0);return{defer:Math.max(0,n-a),duration:Math.min(n,a)}},setAnimation:function(d,l){l.renderer.globalAnimation=e(d,l.options.chart.animation,!0)},stop:G}});M(f,"Core/Renderer/HTML/AST.js",[f["Core/Globals.js"],f["Core/Utilities.js"]],function(a,f){var F=a.SVG_NS,G=f.attr,u=f.createElement,H=f.css,I=f.error,B=f.isFunction,z=f.isString,p=f.objectEach,m=f.splat,e=(f=a.win.trustedTypes)&&B(f.createPolicy)&&f.createPolicy("highcharts",
|
||||
{createHTML:function(d){return d}}),d=e?e.createHTML(""):"";try{var l=!!(new DOMParser).parseFromString(d,"text/html")}catch(h){l=!1}B=function(){function h(d){this.nodes="string"===typeof d?this.parseMarkup(d):d}h.filterUserAttributes=function(d){p(d,function(e,l){var n=!0;-1===h.allowedAttributes.indexOf(l)&&(n=!1);-1!==["background","dynsrc","href","lowsrc","src"].indexOf(l)&&(n=z(e)&&h.allowedReferences.some(function(d){return 0===e.indexOf(d)}));n||(I("Highcharts warning: Invalid attribute '"+
|
||||
l+"' in config"),delete d[l])});return d};h.parseStyle=function(d){return d.split(";").reduce(function(d,e){e=e.split(":").map(function(d){return d.trim()});var l=e[0].replace(/-([a-z])/g,function(d){return d[1].toUpperCase()});e[1]&&(d[l]=e[1]);return d},{})};h.setElementHTML=function(d,e){d.innerHTML=h.emptyHTML;e&&(new h(e)).addToDOM(d)};h.prototype.addToDOM=function(d){function e(d,l){var n;m(d).forEach(function(d){var q=d.tagName,k=d.textContent?a.doc.createTextNode(d.textContent):void 0,c=h.bypassHTMLFiltering;
|
||||
if(q)if("#text"===q)var g=k;else if(-1!==h.allowedTags.indexOf(q)||c){q=a.doc.createElementNS("svg"===q?F:l.namespaceURI||F,q);var b=d.attributes||{};p(d,function(c,g){"tagName"!==g&&"attributes"!==g&&"children"!==g&&"style"!==g&&"textContent"!==g&&(b[g]=c)});G(q,c?b:h.filterUserAttributes(b));d.style&&H(q,d.style);k&&q.appendChild(k);e(d.children||[],q);g=q}else I("Highcharts warning: Invalid tagName "+q+" in config");g&&l.appendChild(g);n=g});return n}return e(this.nodes,d)};h.prototype.parseMarkup=
|
||||
function(d){var n=[];d=d.trim().replace(/ style="/g,' data-style="');if(l)d=(new DOMParser).parseFromString(e?e.createHTML(d):d,"text/html");else{var a=u("div");a.innerHTML=d;d={body:a}}var t=function(d,e){var q=d.nodeName.toLowerCase(),k={tagName:q};"#text"===q&&(k.textContent=d.textContent||"");if(q=d.attributes){var c={};[].forEach.call(q,function(b){"data-style"===b.name?k.style=h.parseStyle(b.value):c[b.name]=b.value});k.attributes=c}if(d.childNodes.length){var g=[];[].forEach.call(d.childNodes,
|
||||
function(b){t(b,g)});g.length&&(k.children=g)}e.push(k)};[].forEach.call(d.body.childNodes,function(d){return t(d,n)});return n};h.allowedAttributes="aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" ");
|
||||
h.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" ");h.allowedTags="a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" ");h.emptyHTML=d;h.bypassHTMLFiltering=!1;return h}();"";return B});
|
||||
M(f,"Core/FormatUtilities.js",[f["Core/DefaultOptions.js"],f["Core/Utilities.js"]],function(a,f){function F(a,m,e,d){a=+a||0;m=+m;var l=G.lang,h=(a.toString().split(".")[1]||"").split("e")[0].length,t=a.toString().split("e"),n=m;if(-1===m)m=Math.min(h,20);else if(!I(m))m=2;else if(m&&t[1]&&0>t[1]){var v=m+ +t[1];0<=v?(t[0]=(+t[0]).toExponential(v).split("e")[0],m=v):(t[0]=t[0].split(".")[0]||0,a=20>m?(t[0]*Math.pow(10,t[1])).toFixed(m):0,t[1]=0)}v=(Math.abs(t[1]?t[0]:a)+Math.pow(10,-Math.max(m,h)-
|
||||
1)).toFixed(m);h=String(z(v));var w=3<h.length?h.length%3:0;e=B(e,l.decimalPoint);d=B(d,l.thousandsSep);a=(0>a?"-":"")+(w?h.substr(0,w)+d:"");a=0>+t[1]&&!n?"0":a+h.substr(w).replace(/(\d{3})(?=\d)/g,"$1"+d);m&&(a+=e+v.slice(-m));t[1]&&0!==+a&&(a+="e"+t[1]);return a}var G=a.defaultOptions,u=a.defaultTime,H=f.getNestedProperty,I=f.isNumber,B=f.pick,z=f.pInt;return{dateFormat:function(a,m,e){return u.dateFormat(a,m,e)},format:function(a,m,e){var d="{",l=!1,h=/f$/,t=/\.([0-9])/,n=G.lang,v=e&&e.time||
|
||||
u;e=e&&e.numberFormatter||F;for(var w=[];a;){var y=a.indexOf(d);if(-1===y)break;var A=a.slice(0,y);if(l){A=A.split(":");d=H(A.shift()||"",m);if(A.length&&"number"===typeof d)if(A=A.join(":"),h.test(A)){var q=parseInt((A.match(t)||["","-1"])[1],10);null!==d&&(d=e(d,q,n.decimalPoint,-1<A.indexOf(",")?n.thousandsSep:""))}else d=v.dateFormat(A,d);w.push(d)}else w.push(A);a=a.slice(y+1);d=(l=!l)?"}":"{"}w.push(a);return w.join("")},numberFormat:F}});M(f,"Core/Renderer/RendererUtilities.js",[f["Core/Utilities.js"]],
|
||||
function(a){var f=a.clamp,C=a.pick,G=a.stableSort,u;(function(a){function F(a,z,p){var m=a,e=m.reducedLen||z,d=function(d,e){return(e.rank||0)-(d.rank||0)},l=function(d,e){return d.target-e.target},h,t=!0,n=[],v=0;for(h=a.length;h--;)v+=a[h].size;if(v>e){G(a,d);for(v=h=0;v<=e;)v+=a[h].size,h++;n=a.splice(h-1,a.length)}G(a,l);for(a=a.map(function(d){return{size:d.size,targets:[d.target],align:C(d.align,.5)}});t;){for(h=a.length;h--;)e=a[h],d=(Math.min.apply(0,e.targets)+Math.max.apply(0,e.targets))/
|
||||
2,e.pos=f(d-e.size*e.align,0,z-e.size);h=a.length;for(t=!1;h--;)0<h&&a[h-1].pos+a[h-1].size>a[h].pos&&(a[h-1].size+=a[h].size,a[h-1].targets=a[h-1].targets.concat(a[h].targets),a[h-1].align=.5,a[h-1].pos+a[h-1].size>z&&(a[h-1].pos=z-a[h-1].size),a.splice(h,1),t=!0)}m.push.apply(m,n);h=0;a.some(function(d){var e=0;return(d.targets||[]).some(function(){m[h].pos=d.pos+e;if("undefined"!==typeof p&&Math.abs(m[h].pos-m[h].target)>p)return m.slice(0,h+1).forEach(function(d){return delete d.pos}),m.reducedLen=
|
||||
(m.reducedLen||z)-.1*z,m.reducedLen>.1*z&&F(m,z,p),!0;e+=m[h].size;h++;return!1})});G(m,l);return m}a.distribute=F})(u||(u={}));return u});M(f,"Core/Renderer/SVG/SVGElement.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/Renderer/HTML/AST.js"],f["Core/Color/Color.js"],f["Core/Globals.js"],f["Core/Utilities.js"]],function(a,f,C,G,u){var F=a.animate,I=a.animObject,B=a.stop,z=G.deg2rad,p=G.doc,m=G.noop,e=G.svg,d=G.SVG_NS,l=G.win,h=u.addEvent,t=u.attr,n=u.createElement,v=u.css,w=u.defined,y=u.erase,
|
||||
A=u.extend,q=u.fireEvent,k=u.isArray,c=u.isFunction,g=u.isNumber,b=u.isString,r=u.merge,x=u.objectEach,D=u.pick,K=u.pInt,P=u.syncTimeout,Q=u.uniqueKey;a=function(){function a(){this.element=void 0;this.onEvents={};this.opacity=1;this.renderer=void 0;this.SVG_NS=d;this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ")}a.prototype._defaultGetter=function(b){b=D(this[b+"Value"],this[b],this.element?this.element.getAttribute(b):null,0);/^[\-0-9\.]+$/.test(b)&&
|
||||
(b=parseFloat(b));return b};a.prototype._defaultSetter=function(b,c,g){g.setAttribute(c,b)};a.prototype.add=function(b){var c=this.renderer,g=this.element;b&&(this.parentGroup=b);this.parentInverted=b&&b.inverted;"undefined"!==typeof this.textStr&&"text"===this.element.nodeName&&c.buildText(this);this.added=!0;if(!b||b.handleZ||this.zIndex)var d=this.zIndexSetter();d||(b?b.element:c.box).appendChild(g);if(this.onAdd)this.onAdd();return this};a.prototype.addClass=function(b,c){var g=c?"":this.attr("class")||
|
||||
"";b=(b||"").split(/ /g).reduce(function(b,c){-1===g.indexOf(c)&&b.push(c);return b},g?[g]:[]).join(" ");b!==g&&this.attr("class",b);return this};a.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)};a.prototype.align=function(c,g,d){var L={},k=this.renderer,r=k.alignedObjects,e,q,E;if(c){if(this.alignOptions=c,this.alignByTranslate=g,!d||b(d))this.alignTo=e=d||"renderer",y(r,this),r.push(this),d=void 0}else c=this.alignOptions,g=this.alignByTranslate,
|
||||
e=this.alignTo;d=D(d,k[e],"scrollablePlotBox"===e?k.plotBox:void 0,k);e=c.align;var a=c.verticalAlign;k=(d.x||0)+(c.x||0);r=(d.y||0)+(c.y||0);"right"===e?q=1:"center"===e&&(q=2);q&&(k+=(d.width-(c.width||0))/q);L[g?"translateX":"x"]=Math.round(k);"bottom"===a?E=1:"middle"===a&&(E=2);E&&(r+=(d.height-(c.height||0))/E);L[g?"translateY":"y"]=Math.round(r);this[this.placed?"animate":"attr"](L);this.placed=!0;this.alignAttr=L;return this};a.prototype.alignSetter=function(b){var c={left:"start",center:"middle",
|
||||
right:"end"};c[b]&&(this.alignValue=b,this.element.setAttribute("text-anchor",c[b]))};a.prototype.animate=function(b,c,g){var d=this,L=I(D(c,this.renderer.globalAnimation,!0));c=L.defer;D(p.hidden,p.msHidden,p.webkitHidden,!1)&&(L.duration=0);0!==L.duration?(g&&(L.complete=g),P(function(){d.element&&F(d,b,L)},c)):(this.attr(b,void 0,g||L.complete),x(b,function(b,c){L.step&&L.step.call(this,b,{prop:c,pos:1,elem:this})},this));return this};a.prototype.applyTextOutline=function(b){var c=this.element;
|
||||
-1!==b.indexOf("contrast")&&(b=b.replace(/contrast/g,this.renderer.getContrast(c.style.fill)));var g=b.split(" ");b=g[g.length-1];if((g=g[0])&&"none"!==g&&G.svg){this.fakeTS=!0;this.ySetter=this.xSetter;g=g.replace(/(^[\d\.]+)(.*?)$/g,function(b,c,g){return 2*Number(c)+g});this.removeTextOutline();var k=p.createElementNS(d,"tspan");t(k,{"class":"highcharts-text-outline",fill:b,stroke:b,"stroke-width":g,"stroke-linejoin":"round"});[].forEach.call(c.childNodes,function(b){var c=b.cloneNode(!0);c.removeAttribute&&
|
||||
["fill","stroke","stroke-width","stroke"].forEach(function(b){return c.removeAttribute(b)});k.appendChild(c)});var r=p.createElementNS(d,"tspan");r.textContent="\u200b";["x","y"].forEach(function(b){var g=c.getAttribute(b);g&&r.setAttribute(b,g)});k.appendChild(r);c.insertBefore(k,c.firstChild)}};a.prototype.attr=function(b,c,g,d){var L=this.element,k=this.symbolCustomAttribs,r,J=this,E,e;if("string"===typeof b&&"undefined"!==typeof c){var q=b;b={};b[q]=c}"string"===typeof b?J=(this[b+"Getter"]||
|
||||
this._defaultGetter).call(this,b,L):(x(b,function(c,g){E=!1;d||B(this,g);this.symbolName&&-1!==k.indexOf(g)&&(r||(this.symbolAttr(b),r=!0),E=!0);!this.rotation||"x"!==g&&"y"!==g||(this.doTransform=!0);E||(e=this[g+"Setter"]||this._defaultSetter,e.call(this,c,g,L),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(g)&&this.updateShadows(g,c,e))},this),this.afterSetters());g&&g.call(this);return J};a.prototype.clip=function(b){return this.attr("clip-path",b?"url("+
|
||||
this.renderer.url+"#"+b.id+")":"none")};a.prototype.crisp=function(b,c){c=c||b.strokeWidth||0;var g=Math.round(c)%2/2;b.x=Math.floor(b.x||this.x||0)+g;b.y=Math.floor(b.y||this.y||0)+g;b.width=Math.floor((b.width||this.width||0)-2*g);b.height=Math.floor((b.height||this.height||0)-2*g);w(b.strokeWidth)&&(b.strokeWidth=c);return b};a.prototype.complexColor=function(b,c,g){var d=this.renderer,L,e,a,l,E,n,h,D,t,m,y=[],A;q(this.renderer,"complexColor",{args:arguments},function(){b.radialGradient?e="radialGradient":
|
||||
b.linearGradient&&(e="linearGradient");if(e){a=b[e];E=d.gradients;n=b.stops;t=g.radialReference;k(a)&&(b[e]=a={x1:a[0],y1:a[1],x2:a[2],y2:a[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===e&&t&&!w(a.gradientUnits)&&(l=a,a=r(a,d.getRadialAttr(t,l),{gradientUnits:"userSpaceOnUse"}));x(a,function(b,c){"id"!==c&&y.push(c,b)});x(n,function(b){y.push(b)});y=y.join(",");if(E[y])m=E[y].attr("id");else{a.id=m=Q();var J=E[y]=d.createElement(e).attr(a).add(d.defs);J.radAttr=l;J.stops=[];n.forEach(function(b){0===
|
||||
b[1].indexOf("rgba")?(L=C.parse(b[1]),h=L.get("rgb"),D=L.get("a")):(h=b[1],D=1);b=d.createElement("stop").attr({offset:b[0],"stop-color":h,"stop-opacity":D}).add(J);J.stops.push(b)})}A="url("+d.url+"#"+m+")";g.setAttribute(c,A);g.gradient=y;b.toString=function(){return A}}})};a.prototype.css=function(b){var c=this.styles,g={},d=this.element,k=!c;b.color&&(b.fill=b.color);c&&x(b,function(b,d){c&&c[d]!==b&&(g[d]=b,k=!0)});if(k){c&&(b=A(c,g));if(null===b.width||"auto"===b.width)delete this.textWidth;
|
||||
else if("text"===d.nodeName.toLowerCase()&&b.width)var a=this.textWidth=K(b.width);this.styles=b;a&&!e&&this.renderer.forExport&&delete b.width;var q=r(b);d.namespaceURI===this.SVG_NS&&["textOutline","textOverflow","width"].forEach(function(b){return q&&delete q[b]});v(d,q);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),b.textOutline&&this.applyTextOutline(b.textOutline))}return this};a.prototype.dashstyleSetter=function(b){var c=this["stroke-width"];"inherit"===c&&(c=
|
||||
1);if(b=b&&b.toLowerCase()){var g=b.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(b=g.length;b--;)g[b]=""+K(g[b])*D(c,NaN);b=g.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",b)}};a.prototype.destroy=function(){var b=this,c=b.element||{},g=b.renderer,d=c.ownerSVGElement,k=g.isSVG&&
|
||||
"SPAN"===c.nodeName&&b.parentGroup||void 0;c.onclick=c.onmouseout=c.onmouseover=c.onmousemove=c.point=null;B(b);if(b.clipPath&&d){var r=b.clipPath;[].forEach.call(d.querySelectorAll("[clip-path],[CLIP-PATH]"),function(b){-1<b.getAttribute("clip-path").indexOf(r.element.id)&&b.removeAttribute("clip-path")});b.clipPath=r.destroy()}if(b.stops){for(d=0;d<b.stops.length;d++)b.stops[d].destroy();b.stops.length=0;b.stops=void 0}b.safeRemoveChild(c);for(g.styledMode||b.destroyShadows();k&&k.div&&0===k.div.childNodes.length;)c=
|
||||
k.parentGroup,b.safeRemoveChild(k.div),delete k.div,k=c;b.alignTo&&y(g.alignedObjects,b);x(b,function(c,g){b[g]&&b[g].parentGroup===b&&b[g].destroy&&b[g].destroy();delete b[g]})};a.prototype.destroyShadows=function(){(this.shadows||[]).forEach(function(b){this.safeRemoveChild(b)},this);this.shadows=void 0};a.prototype.destroyTextPath=function(b,c){var g=b.getElementsByTagName("text")[0];if(g){if(g.removeAttribute("dx"),g.removeAttribute("dy"),c.element.setAttribute("id",""),this.textPathWrapper&&
|
||||
g.getElementsByTagName("textPath").length){for(b=this.textPathWrapper.element.childNodes;b.length;)g.appendChild(b[0]);g.removeChild(this.textPathWrapper.element)}}else if(b.getAttribute("dx")||b.getAttribute("dy"))b.removeAttribute("dx"),b.removeAttribute("dy");this.textPathWrapper&&(this.textPathWrapper=this.textPathWrapper.destroy())};a.prototype.dSetter=function(b,c,g){k(b)&&("string"===typeof b[0]&&(b=this.renderer.pathToSegments(b)),this.pathArray=b,b=b.reduce(function(b,c,g){return c&&c.join?
|
||||
(g?b+" ":"")+c.join(" "):(c||"").toString()},""));/(NaN| {2}|^$)/.test(b)&&(b="M 0 0");this[c]!==b&&(g.setAttribute(c,b),this[c]=b)};a.prototype.fadeOut=function(b){var c=this;c.animate({opacity:0},{duration:D(b,150),complete:function(){c.attr({y:-9999}).hide()}})};a.prototype.fillSetter=function(b,c,g){"string"===typeof b?g.setAttribute(c,b):b&&this.complexColor(b,c,g)};a.prototype.getBBox=function(b,g){var d=this.renderer,k=this.element,r=this.styles,e=this.textStr,q=d.cache,l=d.cacheKeys,E=k.namespaceURI===
|
||||
this.SVG_NS;g=D(g,this.rotation,0);var n=d.styledMode?k&&a.prototype.getStyle.call(k,"font-size"):r&&r.fontSize,x;if(w(e)){var h=e.toString();-1===h.indexOf("<")&&(h=h.replace(/[0-9]/g,"0"));h+=["",g,n,this.textWidth,r&&r.textOverflow,r&&r.fontWeight].join()}h&&!b&&(x=q[h]);if(!x){if(E||d.forExport){try{var t=this.fakeTS&&function(b){var c=k.querySelector(".highcharts-text-outline");c&&v(c,{display:b})};c(t)&&t("none");x=k.getBBox?A({},k.getBBox()):{width:k.offsetWidth,height:k.offsetHeight};c(t)&&
|
||||
t("")}catch(X){""}if(!x||0>x.width)x={width:0,height:0}}else x=this.htmlGetBBox();d.isSVG&&(b=x.width,d=x.height,E&&(x.height=d={"11px,17":14,"13px,20":16}[(n||"")+","+Math.round(d)]||d),g&&(E=g*z,x.width=Math.abs(d*Math.sin(E))+Math.abs(b*Math.cos(E)),x.height=Math.abs(d*Math.cos(E))+Math.abs(b*Math.sin(E))));if(h&&(""===e||0<x.height)){for(;250<l.length;)delete q[l.shift()];q[h]||l.push(h);q[h]=x}}return x};a.prototype.getStyle=function(b){return l.getComputedStyle(this.element||this,"").getPropertyValue(b)};
|
||||
a.prototype.hasClass=function(b){return-1!==(""+this.attr("class")).split(" ").indexOf(b)};a.prototype.hide=function(b){b?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this};a.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}};a.prototype.init=function(b,c){this.element="span"===c?n(c):p.createElementNS(this.SVG_NS,c);this.renderer=b;q(this,"afterInit")};a.prototype.invert=function(b){this.inverted=b;this.updateTransform();return this};a.prototype.on=function(b,c){var g=
|
||||
this.onEvents;if(g[b])g[b]();g[b]=h(this.element,b,c);return this};a.prototype.opacitySetter=function(b,c,g){this.opacity=b=Number(Number(b).toFixed(3));g.setAttribute(c,b)};a.prototype.removeClass=function(c){return this.attr("class",(""+this.attr("class")).replace(b(c)?new RegExp("(^| )"+c+"( |$)"):c," ").replace(/ +/g," ").trim())};a.prototype.removeTextOutline=function(){var b=this.element.querySelector("tspan.highcharts-text-outline");b&&this.safeRemoveChild(b)};a.prototype.safeRemoveChild=function(b){var c=
|
||||
b.parentNode;c&&c.removeChild(b)};a.prototype.setRadialReference=function(b){var c=this.element.gradient&&this.renderer.gradients[this.element.gradient];this.element.radialReference=b;c&&c.radAttr&&c.animate(this.renderer.getRadialAttr(b,c.radAttr));return this};a.prototype.setTextPath=function(b,c){var d=this.element,k=this.text?this.text.element:d,e={textAnchor:"text-anchor"},q=!1,a=this.textPathWrapper,n=!a;c=r(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},c);var E=f.filterUserAttributes(c.attributes);
|
||||
if(b&&c&&c.enabled){a&&null===a.element.parentNode?(n=!0,a=a.destroy()):a&&this.removeTextOutline.call(a.parentGroup);this.options&&this.options.padding&&(E.dx=-this.options.padding);a||(this.textPathWrapper=a=this.renderer.createElement("textPath"),q=!0);var h=a.element;(c=b.element.getAttribute("id"))||b.element.setAttribute("id",c=Q());if(n)for(k.setAttribute("y",0),g(E.dx)&&k.setAttribute("x",-E.dx),b=[].slice.call(k.childNodes),n=0;n<b.length;n++){var D=b[n];D.nodeType!==l.Node.TEXT_NODE&&"tspan"!==
|
||||
D.nodeName||h.appendChild(D)}q&&a&&a.add({element:k});h.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+c);w(E.dy)&&(h.parentNode.setAttribute("dy",E.dy),delete E.dy);w(E.dx)&&(h.parentNode.setAttribute("dx",E.dx),delete E.dx);x(E,function(b,c){h.setAttribute(e[c]||c,b)});d.removeAttribute("transform");this.removeTextOutline.call(a);this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=m}else a&&(delete this.updateTransform,
|
||||
delete this.applyTextOutline,this.destroyTextPath(d,b),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this};a.prototype.shadow=function(b,c,g){var d=[],k=this.element,L=this.oldShadowOptions,r={color:"#000000",offsetX:this.parentInverted?-1:1,offsetY:this.parentInverted?-1:1,opacity:.15,width:3},e=!1,E;!0===b?E=r:"object"===typeof b&&(E=A(r,b));E&&(E&&L&&x(E,function(b,c){b!==L[c]&&(e=!0)}),e&&this.destroyShadows(),this.oldShadowOptions=
|
||||
E);if(!E)this.destroyShadows();else if(!this.shadows){var a=E.opacity/E.width;var q=this.parentInverted?"translate("+E.offsetY+", "+E.offsetX+")":"translate("+E.offsetX+", "+E.offsetY+")";for(r=1;r<=E.width;r++){var l=k.cloneNode(!1);var n=2*E.width+1-2*r;t(l,{stroke:b.color||"#000000","stroke-opacity":a*r,"stroke-width":n,transform:q,fill:"none"});l.setAttribute("class",(l.getAttribute("class")||"")+" highcharts-shadow");g&&(t(l,"height",Math.max(t(l,"height")-n,0)),l.cutHeight=n);c?c.element.appendChild(l):
|
||||
k.parentNode&&k.parentNode.insertBefore(l,k);d.push(l)}this.shadows=d}return this};a.prototype.show=function(b){return this.attr({visibility:b?"inherit":"visible"})};a.prototype.strokeSetter=function(b,c,g){this[c]=b;this.stroke&&this["stroke-width"]?(a.prototype.fillSetter.call(this,this.stroke,"stroke",g),g.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===c&&0===b&&this.hasStroke?(g.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&
|
||||
(g.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};a.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var b=this.getStyle("stroke-width"),c=0;if(b.indexOf("px")===b.length-2)c=K(b);else if(""!==b){var g=p.createElementNS(d,"rect");t(g,{width:b,"stroke-width":0});this.element.parentNode.appendChild(g);c=g.getBBox().width;g.parentNode.removeChild(g)}return c};a.prototype.symbolAttr=function(b){var c=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g){c[g]=
|
||||
D(b[g],c[g])});c.attr({d:c.renderer.symbols[c.symbolName](c.x,c.y,c.width,c.height,c)})};a.prototype.textSetter=function(b){b!==this.textStr&&(delete this.textPxLength,this.textStr=b,this.added&&this.renderer.buildText(this))};a.prototype.titleSetter=function(b){var c=this.element,g=c.getElementsByTagName("title")[0]||p.createElementNS(this.SVG_NS,"title");c.insertBefore?c.insertBefore(g,c.firstChild):c.appendChild(g);g.textContent=String(D(b,"")).replace(/<[^>]*>/g,"").replace(/</g,"<").replace(/>/g,
|
||||
">")};a.prototype.toFront=function(){var b=this.element;b.parentNode.appendChild(b);return this};a.prototype.translate=function(b,c){return this.attr({translateX:b,translateY:c})};a.prototype.updateShadows=function(b,c,g){var d=this.shadows;if(d)for(var k=d.length;k--;)g.call(d[k],"height"===b?Math.max(c-(d[k].cutHeight||0),0):"d"===b?this.d:c,b,d[k])};a.prototype.updateTransform=function(){var b=this.scaleX,c=this.scaleY,g=this.inverted,d=this.rotation,k=this.matrix,r=this.element,e=this.translateX||
|
||||
0,a=this.translateY||0;g&&(e+=this.width,a+=this.height);e=["translate("+e+","+a+")"];w(k)&&e.push("matrix("+k.join(",")+")");g?e.push("rotate(90) scale(-1,1)"):d&&e.push("rotate("+d+" "+D(this.rotationOriginX,r.getAttribute("x"),0)+" "+D(this.rotationOriginY,r.getAttribute("y")||0)+")");(w(b)||w(c))&&e.push("scale("+D(b,1)+" "+D(c,1)+")");e.length&&r.setAttribute("transform",e.join(" "))};a.prototype.visibilitySetter=function(b,c,g){"inherit"===b?g.removeAttribute(c):this[c]!==b&&g.setAttribute(c,
|
||||
b);this[c]=b};a.prototype.xGetter=function(b){"circle"===this.element.nodeName&&("x"===b?b="cx":"y"===b&&(b="cy"));return this._defaultGetter(b)};a.prototype.zIndexSetter=function(b,c){var g=this.renderer,d=this.parentGroup,k=(d||g).element||g.box,r=this.element;g=k===g.box;var e=!1;var a=this.added;var E;w(b)?(r.setAttribute("data-z-index",b),b=+b,this[c]===b&&(a=!1)):w(this[c])&&r.removeAttribute("data-z-index");this[c]=b;if(a){(b=this.zIndex)&&d&&(d.handleZ=!0);c=k.childNodes;for(E=c.length-1;0<=
|
||||
E&&!e;E--){d=c[E];a=d.getAttribute("data-z-index");var q=!w(a);if(d!==r)if(0>b&&q&&!g&&!E)k.insertBefore(r,c[E]),e=!0;else if(K(a)<=b||q&&(!w(b)||0<=b))k.insertBefore(r,c[E+1]||null),e=!0}e||(k.insertBefore(r,c[g?3:0]||null),e=!0)}return e};return a}();a.prototype["stroke-widthSetter"]=a.prototype.strokeSetter;a.prototype.yGetter=a.prototype.xGetter;a.prototype.matrixSetter=a.prototype.rotationOriginXSetter=a.prototype.rotationOriginYSetter=a.prototype.rotationSetter=a.prototype.scaleXSetter=a.prototype.scaleYSetter=
|
||||
a.prototype.translateXSetter=a.prototype.translateYSetter=a.prototype.verticalAlignSetter=function(b,c){this[c]=b;this.doTransform=!0};"";return a});M(f,"Core/Renderer/RendererRegistry.js",[f["Core/Globals.js"]],function(a){var f;(function(f){f.rendererTypes={};var F;f.getRendererType=function(a){void 0===a&&(a=F);return f.rendererTypes[a]||f.rendererTypes[F]};f.registerRendererType=function(u,C,I){f.rendererTypes[u]=C;if(!F||I)F=u,a.Renderer=C}})(f||(f={}));return f});M(f,"Core/Renderer/SVG/SVGLabel.js",
|
||||
[f["Core/Renderer/SVG/SVGElement.js"],f["Core/Utilities.js"]],function(a,f){var F=this&&this.__extends||function(){var a=function(m,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,e){d.__proto__=e}||function(d,e){for(var a in e)e.hasOwnProperty(a)&&(d[a]=e[a])};return a(m,e)};return function(m,e){function d(){this.constructor=m}a(m,e);m.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)}}(),G=f.defined,u=f.extend,H=f.isNumber,I=f.merge,B=f.pick,z=f.removeEvent;
|
||||
return function(p){function m(e,d,a,h,t,n,v,w,y,A){var q=p.call(this)||this;q.paddingLeftSetter=q.paddingSetter;q.paddingRightSetter=q.paddingSetter;q.init(e,"g");q.textStr=d;q.x=a;q.y=h;q.anchorX=n;q.anchorY=v;q.baseline=y;q.className=A;q.addClass("button"===A?"highcharts-no-tooltip":"highcharts-label");A&&q.addClass("highcharts-"+A);q.text=e.text(void 0,0,0,w).attr({zIndex:1});var k;"string"===typeof t&&((k=/^url\((.*?)\)$/.test(t))||q.renderer.symbols[t])&&(q.symbolKey=t);q.bBox=m.emptyBBox;q.padding=
|
||||
3;q.baselineOffset=0;q.needsBox=e.styledMode||k;q.deferredAttr={};q.alignFactor=0;return q}F(m,p);m.prototype.alignSetter=function(e){e={left:0,center:.5,right:1}[e];e!==this.alignFactor&&(this.alignFactor=e,this.bBox&&H(this.xSetting)&&this.attr({x:this.xSetting}))};m.prototype.anchorXSetter=function(e,d){this.anchorX=e;this.boxAttr(d,Math.round(e)-this.getCrispAdjust()-this.xSetting)};m.prototype.anchorYSetter=function(e,d){this.anchorY=e;this.boxAttr(d,e-this.ySetting)};m.prototype.boxAttr=function(e,
|
||||
d){this.box?this.box.attr(e,d):this.deferredAttr[e]=d};m.prototype.css=function(e){if(e){var d={};e=I(e);m.textProps.forEach(function(a){"undefined"!==typeof e[a]&&(d[a]=e[a],delete e[a])});this.text.css(d);var l="width"in d;"fontSize"in d||"fontWeight"in d?this.updateTextPadding():l&&this.updateBoxSize()}return a.prototype.css.call(this,e)};m.prototype.destroy=function(){z(this.element,"mouseenter");z(this.element,"mouseleave");this.text&&this.text.destroy();this.box&&(this.box=this.box.destroy());
|
||||
a.prototype.destroy.call(this)};m.prototype.fillSetter=function(e,d){e&&(this.needsBox=!0);this.fill=e;this.boxAttr(d,e)};m.prototype.getBBox=function(){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var e=this.padding,d=B(this.paddingLeft,e);return{width:this.width,height:this.height,x:this.bBox.x-d,y:this.bBox.y-e}};m.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],
|
||||
10):0)%2/2};m.prototype.heightSetter=function(e){this.heightSetting=e};m.prototype.onAdd=function(){var e=this.textStr;this.text.add(this);this.attr({text:G(e)?e:"",x:this.x,y:this.y});this.box&&G(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})};m.prototype.paddingSetter=function(e,d){H(e)?e!==this[d]&&(this[d]=e,this.updateTextPadding()):this[d]=void 0};m.prototype.rSetter=function(e,d){this.boxAttr(d,e)};m.prototype.shadow=function(e){e&&!this.renderer.styledMode&&(this.updateBoxSize(),
|
||||
this.box&&this.box.shadow(e));return this};m.prototype.strokeSetter=function(e,d){this.stroke=e;this.boxAttr(d,e)};m.prototype["stroke-widthSetter"]=function(e,d){e&&(this.needsBox=!0);this["stroke-width"]=e;this.boxAttr(d,e)};m.prototype["text-alignSetter"]=function(e){this.textAlign=e};m.prototype.textSetter=function(e){"undefined"!==typeof e&&this.text.attr({text:e});this.updateTextPadding()};m.prototype.updateBoxSize=function(){var e=this.text.element.style,d={},a=this.padding,h=this.bBox=H(this.widthSetting)&&
|
||||
H(this.heightSetting)&&!this.textAlign||!G(this.text.textStr)?m.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth();this.height=(this.heightSetting||h.height||0)+2*a;e=this.renderer.fontMetrics(e&&e.fontSize,this.text);this.baselineOffset=a+Math.min((this.text.firstLineMetrics||e).b,h.height||Infinity);this.heightSetting&&(this.baselineOffset+=(this.heightSetting-e.h)/2);this.needsBox&&(this.box||(a=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),a.addClass(("button"===
|
||||
this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),a.add(this)),a=this.getCrispAdjust(),d.x=a,d.y=(this.baseline?-this.baselineOffset:0)+a,d.width=Math.round(this.width),d.height=Math.round(this.height),this.box.attr(u(d,this.deferredAttr)),this.deferredAttr={})};m.prototype.updateTextPadding=function(){var a=this.text;this.updateBoxSize();var d=this.baseline?0:this.baselineOffset,l=B(this.paddingLeft,this.padding);G(this.widthSetting)&&this.bBox&&
|
||||
("center"===this.textAlign||"right"===this.textAlign)&&(l+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width));if(l!==a.x||d!==a.y)a.attr("x",l),a.hasBoxWidthChanged&&(this.bBox=a.getBBox(!0)),"undefined"!==typeof d&&a.attr("y",d);a.x=l;a.y=d};m.prototype.widthSetter=function(a){this.widthSetting=H(a)?a:void 0};m.prototype.getPaddedWidth=function(){var a=this.padding,d=B(this.paddingLeft,a);a=B(this.paddingRight,a);return(this.widthSetting||this.bBox.width||0)+d+a};m.prototype.xSetter=
|
||||
function(a){this.x=a;this.alignFactor&&(a-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0);this.xSetting=Math.round(a);this.attr("translateX",this.xSetting)};m.prototype.ySetter=function(a){this.ySetting=this.y=Math.round(a);this.attr("translateY",this.ySetting)};m.emptyBBox={width:0,height:0,x:0,y:0};m.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" ");return m}(a)});M(f,"Core/Renderer/SVG/Symbols.js",
|
||||
[f["Core/Utilities.js"]],function(a){function f(a,f,p,m,e){var d=[];if(e){var l=e.start||0,h=I(e.r,p);p=I(e.r,m||p);var t=(e.end||0)-.001;m=e.innerR;var n=I(e.open,.001>Math.abs((e.end||0)-l-2*Math.PI)),v=Math.cos(l),w=Math.sin(l),y=Math.cos(t),A=Math.sin(t);l=I(e.longArc,.001>t-l-Math.PI?0:1);d.push(["M",a+h*v,f+p*w],["A",h,p,0,l,I(e.clockwise,1),a+h*y,f+p*A]);u(m)&&d.push(n?["M",a+m*y,f+m*A]:["L",a+m*y,f+m*A],["A",m,m,0,l,u(e.clockwise)?1-e.clockwise:0,a+m*v,f+m*w]);n||d.push(["Z"])}return d}function C(a,
|
||||
f,p,m,e){return e&&e.r?G(a,f,p,m,e):[["M",a,f],["L",a+p,f],["L",a+p,f+m],["L",a,f+m],["Z"]]}function G(a,f,p,m,e){e=e&&e.r||0;return[["M",a+e,f],["L",a+p-e,f],["C",a+p,f,a+p,f,a+p,f+e],["L",a+p,f+m-e],["C",a+p,f+m,a+p,f+m,a+p-e,f+m],["L",a+e,f+m],["C",a,f+m,a,f+m,a,f+m-e],["L",a,f+e],["C",a,f,a,f,a+e,f]]}var u=a.defined,H=a.isNumber,I=a.pick;return{arc:f,callout:function(a,f,p,m,e){var d=Math.min(e&&e.r||0,p,m),l=d+6,h=e&&e.anchorX;e=e&&e.anchorY||0;var t=G(a,f,p,m,{r:d});if(!H(h))return t;a+h>=p?
|
||||
e>f+l&&e<f+m-l?t.splice(3,1,["L",a+p,e-6],["L",a+p+6,e],["L",a+p,e+6],["L",a+p,f+m-d]):t.splice(3,1,["L",a+p,m/2],["L",h,e],["L",a+p,m/2],["L",a+p,f+m-d]):0>=a+h?e>f+l&&e<f+m-l?t.splice(7,1,["L",a,e+6],["L",a-6,e],["L",a,e-6],["L",a,f+d]):t.splice(7,1,["L",a,m/2],["L",h,e],["L",a,m/2],["L",a,f+d]):e&&e>m&&h>a+l&&h<a+p-l?t.splice(5,1,["L",h+6,f+m],["L",h,f+m+6],["L",h-6,f+m],["L",a+d,f+m]):e&&0>e&&h>a+l&&h<a+p-l&&t.splice(1,1,["L",h-6,f],["L",h,f-6],["L",h+6,f],["L",p-d,f]);return t},circle:function(a,
|
||||
z,p,m){return f(a+p/2,z+m/2,p/2,m/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(a,f,p,m){return[["M",a+p/2,f],["L",a+p,f+m/2],["L",a+p/2,f+m],["L",a,f+m/2],["Z"]]},rect:C,roundedRect:G,square:C,triangle:function(a,f,p,m){return[["M",a+p/2,f],["L",a+p,f+m],["L",a,f+m],["Z"]]},"triangle-down":function(a,f,p,m){return[["M",a,f],["L",a+p,f],["L",a+p/2,f+m],["Z"]]}}});M(f,"Core/Renderer/SVG/TextBuilder.js",[f["Core/Renderer/HTML/AST.js"],f["Core/Globals.js"],f["Core/Utilities.js"]],function(a,
|
||||
f,C){var F=f.doc,u=f.SVG_NS,H=f.win,I=C.attr,B=C.extend,z=C.isString,p=C.objectEach,m=C.pick;return function(){function e(d){var a=d.styles;this.renderer=d.renderer;this.svgElement=d;this.width=d.textWidth;this.textLineHeight=a&&a.lineHeight;this.textOutline=a&&a.textOutline;this.ellipsis=!(!a||"ellipsis"!==a.textOverflow);this.noWrap=!(!a||"nowrap"!==a.whiteSpace);this.fontSize=a&&a.fontSize}e.prototype.buildSVG=function(){var d=this.svgElement,e=d.element,h=d.renderer,t=m(d.textStr,"").toString(),
|
||||
n=-1!==t.indexOf("<"),f=e.childNodes;h=this.width&&!d.added&&h.box;var w=/<br.*?>/g,y=[t,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(y!==d.textCache){d.textCache=y;delete d.actualWidth;for(y=f.length;y--;)e.removeChild(f[y]);n||this.ellipsis||this.width||-1!==t.indexOf(" ")&&(!this.noWrap||w.test(t))?""!==t&&(h&&h.appendChild(e),t=new a(t),this.modifyTree(t.nodes),t.addToDOM(d.element),this.modifyDOM(),this.ellipsis&&-1!==(e.textContent||"").indexOf("\u2026")&&
|
||||
d.attr("title",this.unescapeEntities(d.textStr||"",["<",">"])),h&&h.removeChild(e)):e.appendChild(F.createTextNode(this.unescapeEntities(t)));z(this.textOutline)&&d.applyTextOutline&&d.applyTextOutline(this.textOutline)}};e.prototype.modifyDOM=function(){var d=this,a=this.svgElement,e=I(a.element,"x");a.firstLineMetrics=void 0;for(var t;t=a.element.firstChild;)if(/^[\s\u200B]*$/.test(t.textContent||" "))a.element.removeChild(t);else break;[].forEach.call(a.element.querySelectorAll("tspan.highcharts-br"),
|
||||
function(n,h){n.nextSibling&&n.previousSibling&&(0===h&&1===n.previousSibling.nodeType&&(a.firstLineMetrics=a.renderer.fontMetrics(void 0,n.previousSibling)),I(n,{dy:d.getLineHeight(n.nextSibling),x:e}))});var n=this.width||0;if(n){var f=function(h,l){var q=h.textContent||"",k=q.replace(/([^\^])-/g,"$1- ").split(" "),c=!d.noWrap&&(1<k.length||1<a.element.childNodes.length),g=d.getLineHeight(l),b=0,r=a.actualWidth;if(d.ellipsis)q&&d.truncate(h,q,void 0,0,Math.max(0,n-parseInt(d.fontSize||12,10)),function(b,
|
||||
c){return b.substring(0,c)+"\u2026"});else if(c){q=[];for(c=[];l.firstChild&&l.firstChild!==h;)c.push(l.firstChild),l.removeChild(l.firstChild);for(;k.length;)k.length&&!d.noWrap&&0<b&&(q.push(h.textContent||""),h.textContent=k.join(" ").replace(/- /g,"-")),d.truncate(h,void 0,k,0===b?r||0:0,n,function(b,c){return k.slice(0,c).join(" ").replace(/- /g,"-")}),r=a.actualWidth,b++;c.forEach(function(b){l.insertBefore(b,h)});q.forEach(function(b){l.insertBefore(F.createTextNode(b),h);b=F.createElementNS(u,
|
||||
"tspan");b.textContent="\u200b";I(b,{dy:g,x:e});l.insertBefore(b,h)})}},m=function(d){[].slice.call(d.childNodes).forEach(function(e){e.nodeType===H.Node.TEXT_NODE?f(e,d):(-1!==e.className.baseVal.indexOf("highcharts-br")&&(a.actualWidth=0),m(e))})};m(a.element)}};e.prototype.getLineHeight=function(d){var a;d=d.nodeType===H.Node.TEXT_NODE?d.parentElement:d;this.renderer.styledMode||(a=d&&/(px|em)$/.test(d.style.fontSize)?d.style.fontSize:this.fontSize||this.renderer.style.fontSize||12);return this.textLineHeight?
|
||||
parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(a,d||this.svgElement.element).h};e.prototype.modifyTree=function(d){var a=this,e=function(h,n){var l=h.attributes;l=void 0===l?{}:l;var f=h.children,t=h.style;t=void 0===t?{}:t;var m=h.tagName,q=a.renderer.styledMode;if("b"===m||"strong"===m)q?l["class"]="highcharts-strong":t.fontWeight="bold";else if("i"===m||"em"===m)q?l["class"]="highcharts-emphasized":t.fontStyle="italic";t&&t.color&&(t.fill=t.color);"br"===m?(l["class"]="highcharts-br",
|
||||
h.textContent="\u200b",(n=d[n+1])&&n.textContent&&(n.textContent=n.textContent.replace(/^ +/gm,""))):"a"===m&&f&&f.some(function(d){return"#text"===d.tagName})&&(h.children=[{children:f,tagName:"tspan"}]);"#text"!==m&&"a"!==m&&(h.tagName="tspan");B(h,{attributes:l,style:t});f&&f.filter(function(d){return"#text"!==d.tagName}).forEach(e)};d.forEach(e)};e.prototype.truncate=function(d,a,e,t,n,f){var h=this.svgElement,l=h.renderer,m=h.rotation,q=[],k=e?1:0,c=(a||e||"").length,g=c,b,r=function(b,c){c=
|
||||
c||b;var g=d.parentNode;if(g&&"undefined"===typeof q[c])if(g.getSubStringLength)try{q[c]=t+g.getSubStringLength(0,e?c+1:c)}catch(Q){""}else l.getSpanWidth&&(d.textContent=f(a||e,b),q[c]=t+l.getSpanWidth(h,d));return q[c]};h.rotation=0;var x=r(d.textContent.length);if(t+x>n){for(;k<=c;)g=Math.ceil((k+c)/2),e&&(b=f(e,g)),x=r(g,b&&b.length-1),k===c?k=c+1:x>n?c=g-1:k=g;0===c?d.textContent="":a&&c===a.length-1||(d.textContent=b||f(a||e,g))}e&&e.splice(0,g);h.actualWidth=x;h.rotation=m};e.prototype.unescapeEntities=
|
||||
function(d,a){p(this.renderer.escapes,function(e,l){a&&-1!==a.indexOf(e)||(d=d.toString().replace(new RegExp(e,"g"),l))});return d};return e}()});M(f,"Core/Renderer/SVG/SVGRenderer.js",[f["Core/Renderer/HTML/AST.js"],f["Core/Color/Color.js"],f["Core/Globals.js"],f["Core/Renderer/RendererRegistry.js"],f["Core/Renderer/SVG/SVGElement.js"],f["Core/Renderer/SVG/SVGLabel.js"],f["Core/Renderer/SVG/Symbols.js"],f["Core/Renderer/SVG/TextBuilder.js"],f["Core/Utilities.js"]],function(a,f,C,G,u,H,I,B,z){var p=
|
||||
C.charts,m=C.deg2rad,e=C.doc,d=C.isFirefox,l=C.isMS,h=C.isWebKit,t=C.noop,n=C.SVG_NS,v=C.symbolSizes,w=C.win,y=z.addEvent,A=z.attr,q=z.createElement,k=z.css,c=z.defined,g=z.destroyObjectProperties,b=z.extend,r=z.isArray,x=z.isNumber,D=z.isObject,K=z.isString,P=z.merge,Q=z.pick,O=z.pInt,F=z.uniqueKey,Z;C=function(){function L(b,c,g,d,a,k,e){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=
|
||||
this.box=this.alignedObjects=void 0;this.init(b,c,g,d,a,k,e)}L.prototype.init=function(b,c,g,a,r,E,L){var q=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}),J=q.element;L||q.css(this.getStyle(a));b.appendChild(J);A(b,"dir","ltr");-1===b.innerHTML.indexOf("xmlns")&&A(J,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=J;this.boxWrapper=q;this.alignedObjects=[];this.url=this.getReferenceURL();this.createElement("desc").add().element.appendChild(e.createTextNode("Created with Highcharts 10.0.0"));
|
||||
this.defs=this.createElement("defs").add();this.allowHTML=E;this.forExport=r;this.styledMode=L;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(c,g,!1);var n;d&&b.getBoundingClientRect&&(c=function(){k(b,{left:0,top:0});n=b.getBoundingClientRect();k(b,{left:Math.ceil(n.left)-n.left+"px",top:Math.ceil(n.top)-n.top+"px"})},c(),this.unSubPixelFix=y(w,"resize",c))};L.prototype.definition=function(b){return(new a([b])).addToDOM(this.defs.element)};L.prototype.getReferenceURL=
|
||||
function(){if((d||h)&&e.getElementsByTagName("base").length){if(!c(Z)){var b=F();b=(new a([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:b},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":"url(#"+b+")",fill:"rgba(0,0,0,0.001)"}}]}])).addToDOM(e.body);k(b,{position:"fixed",top:0,left:0,zIndex:9E5});var g=e.elementFromPoint(6,6);Z="hitme"===(g&&g.id);
|
||||
e.body.removeChild(b)}if(Z)return w.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""};L.prototype.getStyle=function(c){return this.style=b({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},c)};L.prototype.setStyle=function(b){this.boxWrapper.css(this.getStyle(b))};L.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width};L.prototype.destroy=function(){var b=this.defs;this.box=
|
||||
null;this.boxWrapper=this.boxWrapper.destroy();g(this.gradients||{});this.gradients=null;b&&(this.defs=b.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null};L.prototype.createElement=function(b){var c=new this.Element;c.init(this,b);return c};L.prototype.getRadialAttr=function(b,c){return{cx:b[0]-b[2]/2+(c.cx||0)*b[2],cy:b[1]-b[2]/2+(c.cy||0)*b[2],r:(c.r||0)*b[2]}};L.prototype.buildText=function(b){(new B(b)).buildSVG()};L.prototype.getContrast=function(b){b=f.parse(b).rgba;
|
||||
b[0]*=1;b[1]*=1.2;b[2]*=.5;return 459<b[0]+b[1]+b[2]?"#000000":"#FFFFFF"};L.prototype.button=function(c,g,d,k,e,r,L,q,n,h){var E=this.label(c,g,d,n,void 0,void 0,h,void 0,"button"),x=this.styledMode,J=0,f=e?P(e):{},t=P({color:"#333333",cursor:"pointer",fontWeight:"normal"},f.style);delete f.style;f=a.filterUserAttributes(f);E.attr(P({padding:8,r:2},f));if(!x){f=P({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1},f);r=P(f,{fill:"#e6e6e6"},a.filterUserAttributes(r||{}));var N=r.style;delete r.style;
|
||||
L=P(f,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},a.filterUserAttributes(L||{}));var m=L.style;delete L.style;q=P(f,{style:{color:"#cccccc"}},a.filterUserAttributes(q||{}));var w=q.style;delete q.style}y(E.element,l?"mouseover":"mouseenter",function(){3!==J&&E.setState(1)});y(E.element,l?"mouseout":"mouseleave",function(){3!==J&&E.setState(J)});E.setState=function(b){1!==b&&(E.state=J=b);E.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+
|
||||
["normal","hover","pressed","disabled"][b||0]);x||(E.attr([f,r,L,q][b||0]),b=[t,N,m,w][b||0],D(b)&&E.css(b))};x||E.attr(f).css(b({cursor:"default"},t));return E.on("touchstart",function(b){return b.stopPropagation()}).on("click",function(b){3!==J&&k.call(E,b)})};L.prototype.crispLine=function(b,g,d){void 0===d&&(d="round");var a=b[0],k=b[1];c(a[1])&&a[1]===k[1]&&(a[1]=k[1]=Math[d](a[1])-g%2/2);c(a[2])&&a[2]===k[2]&&(a[2]=k[2]=Math[d](a[2])+g%2/2);return b};L.prototype.path=function(c){var g=this.styledMode?
|
||||
{}:{fill:"none"};r(c)?g.d=c:D(c)&&b(g,c);return this.createElement("path").attr(g)};L.prototype.circle=function(b,c,g){b=D(b)?b:"undefined"===typeof b?{}:{x:b,y:c,r:g};c=this.createElement("circle");c.xSetter=c.ySetter=function(b,c,g){g.setAttribute("c"+c,b)};return c.attr(b)};L.prototype.arc=function(b,c,g,d,a,k){D(b)?(d=b,c=d.y,g=d.r,b=d.x):d={innerR:d,start:a,end:k};b=this.symbol("arc",b,c,g,g,d);b.r=g;return b};L.prototype.rect=function(b,c,g,d,a,k){a=D(b)?b.r:a;var e=this.createElement("rect");
|
||||
b=D(b)?b:"undefined"===typeof b?{}:{x:b,y:c,width:Math.max(g,0),height:Math.max(d,0)};this.styledMode||("undefined"!==typeof k&&(b["stroke-width"]=k,b=e.crisp(b)),b.fill="none");a&&(b.r=a);e.rSetter=function(b,c,g){e.r=b;A(g,{rx:b,ry:b})};e.rGetter=function(){return e.r||0};return e.attr(b)};L.prototype.setSize=function(b,c,g){this.width=b;this.height=c;this.boxWrapper.animate({width:b,height:c},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:Q(g,
|
||||
!0)?void 0:0});this.alignElements()};L.prototype.g=function(b){var c=this.createElement("g");return b?c.attr({"class":"highcharts-"+b}):c};L.prototype.image=function(b,c,g,d,a,k){var e={preserveAspectRatio:"none"},r=function(b,c){b.setAttributeNS?b.setAttributeNS("http://www.w3.org/1999/xlink","href",c):b.setAttribute("hc-svg-href",c)};x(c)&&(e.x=c);x(g)&&(e.y=g);x(d)&&(e.width=d);x(a)&&(e.height=a);var E=this.createElement("image").attr(e);c=function(c){r(E.element,b);k.call(E,c)};k?(r(E.element,
|
||||
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),g=new w.Image,y(g,"load",c),g.src=b,g.complete&&c({})):r(E.element,b);return E};L.prototype.symbol=function(g,d,a,r,L,E){var n=this,h=/^url\((.*?)\)$/,x=h.test(g),l=!x&&(this.symbols[g]?g:"circle"),D=l&&this.symbols[l],f;if(D){"number"===typeof d&&(f=D.call(this.symbols,Math.round(d||0),Math.round(a||0),r||0,L||0,E));var t=this.path(f);n.styledMode||t.attr("fill","none");b(t,{symbolName:l||void 0,x:d,y:a,width:r,height:L});
|
||||
E&&b(t,E)}else if(x){var m=g.match(h)[1];var J=t=this.image(m);J.imgwidth=Q(v[m]&&v[m].width,E&&E.width);J.imgheight=Q(v[m]&&v[m].height,E&&E.height);var y=function(b){return b.attr({width:b.width,height:b.height})};["width","height"].forEach(function(b){J[b+"Setter"]=function(b,g){var d=this["img"+g];this[g]=b;c(d)&&(E&&"within"===E.backgroundSize&&this.width&&this.height&&(d=Math.round(d*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(g,d),
|
||||
this.alignByTranslate||(b=((this[g]||0)-d)/2,this.attr("width"===g?{translateX:b}:{translateY:b})))}});c(d)&&J.attr({x:d,y:a});J.isImg=!0;c(J.imgwidth)&&c(J.imgheight)?y(J):(J.attr({width:0,height:0}),q("img",{onload:function(){var b=p[n.chartIndex];0===this.width&&(k(this,{position:"absolute",top:"-999em"}),e.body.appendChild(this));v[m]={width:this.width,height:this.height};J.imgwidth=this.width;J.imgheight=this.height;J.element&&y(J);this.parentNode&&this.parentNode.removeChild(this);n.imgCount--;
|
||||
if(!n.imgCount&&b&&!b.hasLoaded)b.onload()},src:m}),this.imgCount++)}return t};L.prototype.clipRect=function(b,c,g,d){var a=F()+"-",k=this.createElement("clipPath").attr({id:a}).add(this.defs);b=this.rect(b,c,g,d,0).add(k);b.id=a;b.clipPath=k;b.count=0;return b};L.prototype.text=function(b,g,d,a){var k={};if(a&&(this.allowHTML||!this.forExport))return this.html(b,g,d);k.x=Math.round(g||0);d&&(k.y=Math.round(d));c(b)&&(k.text=b);b=this.createElement("text").attr(k);if(!a||this.forExport&&!this.allowHTML)b.xSetter=
|
||||
function(b,c,g){for(var d=g.getElementsByTagName("tspan"),a=g.getAttribute(c),k=0,e;k<d.length;k++)e=d[k],e.getAttribute(c)===a&&e.setAttribute(c,b);g.setAttribute(c,b)};return b};L.prototype.fontMetrics=function(b,c){b=!this.styledMode&&/px/.test(b)||!w.getComputedStyle?b||c&&c.style&&c.style.fontSize||this.style&&this.style.fontSize:c&&u.prototype.getStyle.call(c,"font-size");b=/px/.test(b)?O(b):12;c=24>b?b+3:Math.round(1.2*b);return{h:c,b:Math.round(.8*c),f:b}};L.prototype.rotCorr=function(b,c,
|
||||
g){var d=b;c&&g&&(d=Math.max(d*Math.cos(c*m),4));return{x:-b/3*Math.sin(c*m),y:d}};L.prototype.pathToSegments=function(b){for(var c=[],g=[],d={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2},a=0;a<b.length;a++)K(g[0])&&x(b[a])&&g.length===d[g[0].toUpperCase()]&&b.splice(a,0,g[0].replace("M","L").replace("m","l")),"string"===typeof b[a]&&(g.length&&c.push(g.slice(0)),g.length=0),g.push(b[a]);c.push(g.slice(0));return c};L.prototype.label=function(b,c,g,d,a,k,e,r,L){return new H(this,b,c,g,d,a,k,e,r,L)};L.prototype.alignElements=
|
||||
function(){this.alignedObjects.forEach(function(b){return b.align()})};return L}();b(C.prototype,{Element:u,SVG_NS:n,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:I,draw:t});G.registerRendererType("svg",C,!0);"";return C});M(f,"Core/Renderer/HTML/HTMLElement.js",[f["Core/Globals.js"],f["Core/Renderer/SVG/SVGElement.js"],f["Core/Utilities.js"]],function(a,f,C){var F=this&&this.__extends||function(){var d=function(a,e){d=Object.setPrototypeOf||{__proto__:[]}instanceof
|
||||
Array&&function(d,a){d.__proto__=a}||function(d,a){for(var e in a)a.hasOwnProperty(e)&&(d[e]=a[e])};return d(a,e)};return function(a,e){function n(){this.constructor=a}d(a,e);a.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),u=a.isFirefox,H=a.isMS,I=a.isWebKit,B=a.win,z=C.css,p=C.defined,m=C.extend,e=C.pick,d=C.pInt;return function(a){function h(){return null!==a&&a.apply(this,arguments)||this}F(h,a);h.compose=function(d){if(-1===h.composedClasses.indexOf(d)){h.composedClasses.push(d);
|
||||
var a=h.prototype,e=d.prototype;e.getSpanCorrection=a.getSpanCorrection;e.htmlCss=a.htmlCss;e.htmlGetBBox=a.htmlGetBBox;e.htmlUpdateTransform=a.htmlUpdateTransform;e.setSpanRotation=a.setSpanRotation}return d};h.prototype.getSpanCorrection=function(d,a,e){this.xCorr=-d*e;this.yCorr=-a};h.prototype.htmlCss=function(d){var a="SPAN"===this.element.tagName&&d&&"width"in d,h=e(a&&d.width,void 0);if(a){delete d.width;this.textWidth=h;var l=!0}d&&"ellipsis"===d.textOverflow&&(d.whiteSpace="nowrap",d.overflow=
|
||||
"hidden");this.styles=m(this.styles,d);z(this.element,d);l&&this.htmlUpdateTransform();return this};h.prototype.htmlGetBBox=function(){var d=this.element;return{x:d.offsetLeft,y:d.offsetTop,width:d.offsetWidth,height:d.offsetHeight}};h.prototype.htmlUpdateTransform=function(){if(this.added){var a=this.renderer,e=this.element,h=this.translateX||0,l=this.translateY||0,f=this.x||0,m=this.y||0,q=this.textAlign||"left",k={left:0,center:.5,right:1}[q],c=this.styles;c=c&&c.whiteSpace;z(e,{marginLeft:h,marginTop:l});
|
||||
!a.styledMode&&this.shadows&&this.shadows.forEach(function(b){z(b,{marginLeft:h+1,marginTop:l+1})});this.inverted&&[].forEach.call(e.childNodes,function(b){a.invertChild(b,e)});if("SPAN"===e.tagName){var g=this.rotation,b=this.textWidth&&d(this.textWidth),r=[g,q,e.innerHTML,this.textWidth,this.textAlign].join(),x=void 0;x=!1;if(b!==this.oldTextWidth){if(this.textPxLength)var D=this.textPxLength;else z(e,{width:"",whiteSpace:c||"nowrap"}),D=e.offsetWidth;(b>this.oldTextWidth||D>b)&&(/[ \-]/.test(e.textContent||
|
||||
e.innerText)||"ellipsis"===e.style.textOverflow)&&(z(e,{width:D>b||g?b+"px":"auto",display:"block",whiteSpace:c||"normal"}),this.oldTextWidth=b,x=!0)}this.hasBoxWidthChanged=x;r!==this.cTT&&(x=a.fontMetrics(e.style.fontSize,e).b,!p(g)||g===(this.oldRotation||0)&&q===this.oldAlign||this.setSpanRotation(g,k,x),this.getSpanCorrection(!p(g)&&this.textPxLength||e.offsetWidth,x,k,g,q));z(e,{left:f+(this.xCorr||0)+"px",top:m+(this.yCorr||0)+"px"});this.cTT=r;this.oldRotation=g;this.oldAlign=q}}else this.alignOnAdd=
|
||||
!0};h.prototype.setSpanRotation=function(d,a,e){var h={},n=H&&!/Edge/.test(B.navigator.userAgent)?"-ms-transform":I?"-webkit-transform":u?"MozTransform":B.opera?"-o-transform":void 0;n&&(h[n]=h.transform="rotate("+d+"deg)",h[n+(u?"Origin":"-origin")]=h.transformOrigin=100*a+"% "+e+"px",z(this.element,h))};h.composedClasses=[];return h}(f)});M(f,"Core/Renderer/HTML/HTMLRenderer.js",[f["Core/Renderer/HTML/AST.js"],f["Core/Renderer/SVG/SVGElement.js"],f["Core/Renderer/SVG/SVGRenderer.js"],f["Core/Utilities.js"]],
|
||||
function(a,f,C,G){var F=this&&this.__extends||function(){var a=function(f,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,a){d.__proto__=a}||function(d,a){for(var e in a)a.hasOwnProperty(e)&&(d[e]=a[e])};return a(f,e)};return function(f,e){function d(){this.constructor=f}a(f,e);f.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)}}(),H=G.attr,I=G.createElement,B=G.extend,z=G.pick;return function(p){function m(){return null!==p&&p.apply(this,arguments)||this}
|
||||
F(m,p);m.compose=function(a){-1===m.composedClasses.indexOf(a)&&(m.composedClasses.push(a),a.prototype.html=m.prototype.html);return a};m.prototype.html=function(e,d,l){var h=this.createElement("span"),m=h.element,n=h.renderer,p=n.isSVG,w=function(d,a){["opacity","visibility"].forEach(function(e){d[e+"Setter"]=function(k,c,g){var b=d.div?d.div.style:a;f.prototype[e+"Setter"].call(this,k,c,g);b&&(b[c]=k)}});d.addedSetters=!0};h.textSetter=function(d){d!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,
|
||||
a.setElementHTML(this.element,z(d,"")),this.textStr=d,h.doTransform=!0)};p&&w(h,h.element.style);h.xSetter=h.ySetter=h.alignSetter=h.rotationSetter=function(d,a){"align"===a?h.alignValue=h.textAlign=d:h[a]=d;h.doTransform=!0};h.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};h.attr({text:e,x:Math.round(d),y:Math.round(l)}).css({position:"absolute"});n.styledMode||h.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});m.style.whiteSpace="nowrap";
|
||||
h.css=h.htmlCss;p&&(h.add=function(d){var a=n.box.parentNode,e=[];if(this.parentGroup=d){var k=d.div;if(!k){for(;d;)e.push(d),d=d.parentGroup;e.reverse().forEach(function(c){function g(b,g){c[g]=b;"translateX"===g?q.left=b+"px":q.top=b+"px";c.doTransform=!0}var b=H(c.element,"class"),d=c.styles||{};k=c.div=c.div||I("div",b?{className:b}:void 0,{position:"absolute",left:(c.translateX||0)+"px",top:(c.translateY||0)+"px",display:c.display,opacity:c.opacity,cursor:d.cursor,pointerEvents:d.pointerEvents,
|
||||
visibility:c.visibility},k||a);var q=k.style;B(c,{classSetter:function(b){return function(c){this.element.setAttribute("class",c);b.className=c}}(k),on:function(){e[0].div&&h.on.apply({element:e[0].div,onEvents:c.onEvents},arguments);return c},translateXSetter:g,translateYSetter:g});c.addedSetters||w(c)})}}else k=a;k.appendChild(m);h.added=!0;h.alignOnAdd&&h.htmlUpdateTransform();return h});return h};m.composedClasses=[];return m}(C)});M(f,"Core/Axis/AxisDefaults.js",[],function(){var a;(function(a){a.defaultXAxisOptions=
|
||||
{alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:void 0,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,
|
||||
rotation:void 0,staggerLines:0,step:0,useHTML:!1,x:0,zIndex:7,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,
|
||||
style:{color:"#666666"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#ccd6eb"};a.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",
|
||||
formatter:function(){var a=this.axis.chart.numberFormatter;return a(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0};a.defaultLeftAxisOptions={labels:{x:-15},title:{rotation:270}};a.defaultRightAxisOptions={labels:{x:15},title:{rotation:90}};a.defaultBottomAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}};a.defaultTopAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}}})(a||
|
||||
(a={}));return a});M(f,"Core/Foundation.js",[f["Core/Utilities.js"]],function(a){var f=a.addEvent,C=a.isFunction,G=a.objectEach,u=a.removeEvent,H;(function(a){a.registerEventOptions=function(a,z){a.eventOptions=a.eventOptions||{};G(z.events,function(p,m){a.eventOptions[m]!==p&&(a.eventOptions[m]&&(u(a,m,a.eventOptions[m]),delete a.eventOptions[m]),C(p)&&(a.eventOptions[m]=p,f(a,m,p)))})}})(H||(H={}));return H});M(f,"Core/Axis/Tick.js",[f["Core/FormatUtilities.js"],f["Core/Globals.js"],f["Core/Utilities.js"]],
|
||||
function(a,f,C){var F=f.deg2rad,u=C.clamp,H=C.correctFloat,I=C.defined,B=C.destroyObjectProperties,z=C.extend,p=C.fireEvent,m=C.isNumber,e=C.merge,d=C.objectEach,l=C.pick;f=function(){function h(d,a,e,h,f){this.isNewLabel=this.isNew=!0;this.axis=d;this.pos=a;this.type=e||"";this.parameters=f||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;p(this,"init");e||h||this.addLabel()}h.prototype.addLabel=function(){var d=this,e=d.axis,h=e.options,f=e.chart,y=e.categories,
|
||||
A=e.logarithmic,q=e.names,k=d.pos,c=l(d.options&&d.options.labels,h.labels),g=e.tickPositions,b=k===g[0],r=k===g[g.length-1],x=(!c.step||1===c.step)&&1===e.tickInterval;g=g.info;var D=d.label,K;y=this.parameters.category||(y?l(y[k],q[k],k):k);A&&m(y)&&(y=H(A.lin2log(y)));if(e.dateTime)if(g){var P=f.time.resolveDTLFormat(h.dateTimeLabelFormats[!h.grid&&g.higherRanks[k]||g.unitName]);var Q=P.main}else m(y)&&(Q=e.dateTime.getXDateFormat(y,h.dateTimeLabelFormats||{}));d.isFirst=b;d.isLast=r;var O={axis:e,
|
||||
chart:f,dateTimeLabelFormat:Q,isFirst:b,isLast:r,pos:k,tick:d,tickPositionInfo:g,value:y};p(this,"labelFormat",O);var B=function(b){return c.formatter?c.formatter.call(b,b):c.format?(b.text=e.defaultLabelFormatter.call(b),a.format(c.format,b,f)):e.defaultLabelFormatter.call(b,b)};h=B.call(O,O);var F=P&&P.list;d.shortenLabel=F?function(){for(K=0;K<F.length;K++)if(z(O,{dateTimeLabelFormat:F[K]}),D.attr({text:B.call(O,O)}),D.getBBox().width<e.getSlotWidth(d)-2*c.padding)return;D.attr({text:""})}:void 0;
|
||||
x&&e._addedPlotLB&&d.moveLabel(h,c);I(D)||d.movedLabel?D&&D.textStr!==h&&!x&&(!D.textWidth||c.style.width||D.styles.width||D.css({width:null}),D.attr({text:h}),D.textPxLength=D.getBBox().width):(d.label=D=d.createLabel({x:0,y:0},h,c),d.rotation=0)};h.prototype.createLabel=function(d,a,h){var f=this.axis,n=f.chart;if(d=I(a)&&h.enabled?n.renderer.text(a,d.x,d.y,h.useHTML).add(f.labelGroup):null)n.styledMode||d.css(e(h.style)),d.textPxLength=d.getBBox().width;return d};h.prototype.destroy=function(){B(this,
|
||||
this.axis)};h.prototype.getPosition=function(d,a,e,h){var f=this.axis,n=f.chart,q=h&&n.oldChartHeight||n.chartHeight;d={x:d?H(f.translate(a+e,null,null,h)+f.transB):f.left+f.offset+(f.opposite?(h&&n.oldChartWidth||n.chartWidth)-f.right-f.left:0),y:d?q-f.bottom+f.offset-(f.opposite?f.height:0):H(q-f.translate(a+e,null,null,h)-f.transB)};d.y=u(d.y,-1E5,1E5);p(this,"afterGetPosition",{pos:d});return d};h.prototype.getLabelPosition=function(d,a,e,h,f,l,q,k){var c=this.axis,g=c.transA,b=c.isLinked&&c.linkedParent?
|
||||
c.linkedParent.reversed:c.reversed,r=c.staggerLines,x=c.tickRotCorr||{x:0,y:0},n=h||c.reserveSpaceDefault?0:-c.labelOffset*("center"===c.labelAlign?.5:1),m={},t=f.y;I(t)||(t=0===c.side?e.rotation?-8:-e.getBBox().height:2===c.side?x.y+8:Math.cos(e.rotation*F)*(x.y-e.getBBox(!1,0).height/2));d=d+f.x+n+x.x-(l&&h?l*g*(b?-1:1):0);a=a+t-(l&&!h?l*g*(b?1:-1):0);r&&(e=q/(k||1)%r,c.opposite&&(e=r-e-1),a+=c.labelOffset/r*e);m.x=d;m.y=Math.round(a);p(this,"afterGetLabelPosition",{pos:m,tickmarkOffset:l,index:q});
|
||||
return m};h.prototype.getLabelSize=function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0};h.prototype.getMarkPath=function(d,a,e,h,f,l){return l.crispLine([["M",d,a],["L",d+(f?0:-e),a+(f?e:0)]],h)};h.prototype.handleOverflow=function(d){var a=this.axis,e=a.options.labels,h=d.x,f=a.chart.chartWidth,m=a.chart.spacing,q=l(a.labelLeft,Math.min(a.pos,m[3]));m=l(a.labelRight,Math.max(a.isRadial?0:a.pos+a.len,f-m[1]));var k=this.label,c=this.rotation,g={left:0,center:.5,right:1}[a.labelAlign||
|
||||
k.attr("align")],b=k.getBBox().width,r=a.getSlotWidth(this),x={},D=r,p=1,t;if(c||"justify"!==e.overflow)0>c&&h-g*b<q?t=Math.round(h/Math.cos(c*F)-q):0<c&&h+g*b>m&&(t=Math.round((f-h)/Math.cos(c*F)));else if(f=h+(1-g)*b,h-g*b<q?D=d.x+D*(1-g)-q:f>m&&(D=m-d.x+D*g,p=-1),D=Math.min(r,D),D<r&&"center"===a.labelAlign&&(d.x+=p*(r-D-g*(r-Math.min(b,D)))),b>D||a.autoRotation&&(k.styles||{}).width)t=D;t&&(this.shortenLabel?this.shortenLabel():(x.width=Math.floor(t)+"px",(e.style||{}).textOverflow||(x.textOverflow=
|
||||
"ellipsis"),k.css(x)))};h.prototype.moveLabel=function(a,e){var h=this,f=h.label,l=h.axis,n=l.reversed,q=!1;f&&f.textStr===a?(h.movedLabel=f,q=!0,delete h.label):d(l.ticks,function(c){q||c.isNew||c===h||!c.label||c.label.textStr!==a||(h.movedLabel=c.label,q=!0,c.labelPos=h.movedLabel.xy,delete c.label)});if(!q&&(h.labelPos||f)){var k=h.labelPos||f.xy;f=l.horiz?n?0:l.width+l.left:k.x;l=l.horiz?k.y:n?l.width+l.left:0;h.movedLabel=h.createLabel({x:f,y:l},a,e);h.movedLabel&&h.movedLabel.attr({opacity:0})}};
|
||||
h.prototype.render=function(d,a,e){var h=this.axis,f=h.horiz,n=this.pos,q=l(this.tickmarkOffset,h.tickmarkOffset);n=this.getPosition(f,n,q,a);q=n.x;var k=n.y;h=f&&q===h.pos+h.len||!f&&k===h.pos?-1:1;f=l(e,this.label&&this.label.newOpacity,1);e=l(e,1);this.isActive=!0;this.renderGridLine(a,e,h);this.renderMark(n,e,h);this.renderLabel(n,a,f,d);this.isNew=!1;p(this,"afterRender")};h.prototype.renderGridLine=function(d,a,e){var h=this.axis,f=h.options,n={},q=this.pos,k=this.type,c=l(this.tickmarkOffset,
|
||||
h.tickmarkOffset),g=h.chart.renderer,b=this.gridLine,r=f.gridLineWidth,x=f.gridLineColor,D=f.gridLineDashStyle;"minor"===this.type&&(r=f.minorGridLineWidth,x=f.minorGridLineColor,D=f.minorGridLineDashStyle);b||(h.chart.styledMode||(n.stroke=x,n["stroke-width"]=r||0,n.dashstyle=D),k||(n.zIndex=1),d&&(a=0),this.gridLine=b=g.path().attr(n).addClass("highcharts-"+(k?k+"-":"")+"grid-line").add(h.gridGroup));if(b&&(e=h.getPlotLinePath({value:q+c,lineWidth:b.strokeWidth()*e,force:"pass",old:d})))b[d||this.isNew?
|
||||
"attr":"animate"]({d:e,opacity:a})};h.prototype.renderMark=function(d,a,e){var h=this.axis,f=h.options,n=h.chart.renderer,q=this.type,k=h.tickSize(q?q+"Tick":"tick"),c=d.x;d=d.y;var g=l(f["minor"!==q?"tickWidth":"minorTickWidth"],!q&&h.isXAxis?1:0);f=f["minor"!==q?"tickColor":"minorTickColor"];var b=this.mark,r=!b;k&&(h.opposite&&(k[0]=-k[0]),b||(this.mark=b=n.path().addClass("highcharts-"+(q?q+"-":"")+"tick").add(h.axisGroup),h.chart.styledMode||b.attr({stroke:f,"stroke-width":g})),b[r?"attr":"animate"]({d:this.getMarkPath(c,
|
||||
d,k[0],b.strokeWidth()*e,h.horiz,n),opacity:a}))};h.prototype.renderLabel=function(d,a,e,h){var f=this.axis,n=f.horiz,q=f.options,k=this.label,c=q.labels,g=c.step;f=l(this.tickmarkOffset,f.tickmarkOffset);var b=d.x;d=d.y;var r=!0;k&&m(b)&&(k.xy=d=this.getLabelPosition(b,d,k,n,c,f,h,g),this.isFirst&&!this.isLast&&!q.showFirstLabel||this.isLast&&!this.isFirst&&!q.showLastLabel?r=!1:!n||c.step||c.rotation||a||0===e||this.handleOverflow(d),g&&h%g&&(r=!1),r&&m(d.y)?(d.opacity=e,k[this.isNewLabel?"attr":
|
||||
"animate"](d),this.isNewLabel=!1):(k.attr("y",-9999),this.isNewLabel=!0))};h.prototype.replaceMovedLabel=function(){var d=this.label,a=this.axis,e=a.reversed;if(d&&!this.isNew){var h=a.horiz?e?a.left:a.width+a.left:d.xy.x;e=a.horiz?d.xy.y:e?a.width+a.top:a.top;d.animate({x:h,y:e,opacity:0},void 0,d.destroy);delete this.label}a.isDirty=!0;this.label=this.movedLabel;delete this.movedLabel};return h}();"";return f});M(f,"Core/Axis/Axis.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/Axis/AxisDefaults.js"],
|
||||
f["Core/Color/Color.js"],f["Core/DefaultOptions.js"],f["Core/Foundation.js"],f["Core/Globals.js"],f["Core/Axis/Tick.js"],f["Core/Utilities.js"]],function(a,f,C,G,u,H,I,B){var z=a.animObject,p=G.defaultOptions,m=u.registerEventOptions,e=H.deg2rad,d=B.arrayMax,l=B.arrayMin,h=B.clamp,t=B.correctFloat,n=B.defined,v=B.destroyObjectProperties,w=B.erase,y=B.error,A=B.extend,q=B.fireEvent,k=B.getMagnitude,c=B.isArray,g=B.isNumber,b=B.isString,r=B.merge,x=B.normalizeTickInterval,D=B.objectEach,K=B.pick,P=
|
||||
B.relativeLength,Q=B.removeEvent,O=B.splat,W=B.syncTimeout;a=function(){function a(b,c){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=this.top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=
|
||||
this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.height=this.hasVisibleSeries=this.hasNames=this.eventOptions=this.coll=this.closestPointRange=this.chart=this.bottom=this.alternateBands=void 0;this.init(b,c)}a.prototype.init=function(b,c){var a=c.isX;this.chart=b;this.horiz=b.inverted&&!this.isZAxis?!a:a;this.isXAxis=a;this.coll=this.coll||(a?"xAxis":"yAxis");
|
||||
q(this,"init",{userOptions:c});this.opposite=K(c.opposite,this.opposite);this.side=K(c.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(c);var d=this.options,e=d.labels,k=d.type;this.userOptions=c;this.minPixelPadding=0;this.reversed=K(d.reversed,this.reversed);this.visible=d.visible;this.zoomEnabled=d.zoomEnabled;this.hasNames="category"===k||!0===d.categories;this.categories=d.categories||(this.hasNames?[]:void 0);this.names||(this.names=[],this.names.keys={});this.plotLinesAndBandsGroups=
|
||||
{};this.positiveValuesOnly=!!this.logarithmic;this.isLinked=n(d.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.min=this.max=null;c=K(d.crosshair,O(b.options.tooltip.crosshairs)[a?0:1]);this.crosshair=!0===c?{}:c;-1===b.axes.indexOf(this)&&(a?b.axes.splice(b.xAxis.length,0,this):b.axes.push(this),b[this.coll].push(this));this.series=
|
||||
this.series||[];b.inverted&&!this.isZAxis&&a&&"undefined"===typeof this.reversed&&(this.reversed=!0);this.labelRotation=g(e.rotation)?e.rotation:void 0;m(this,d);q(this,"afterInit")};a.prototype.setOptions=function(b){this.options=r(f.defaultXAxisOptions,"yAxis"===this.coll&&f.defaultYAxisOptions,[f.defaultTopAxisOptions,f.defaultRightAxisOptions,f.defaultBottomAxisOptions,f.defaultLeftAxisOptions][this.side],r(p[this.coll],b));q(this,"afterSetOptions",{userOptions:b})};a.prototype.defaultLabelFormatter=
|
||||
function(b){var c=this.axis;b=this.chart.numberFormatter;var a=g(this.value)?this.value:NaN,d=c.chart.time,e=this.dateTimeLabelFormat,k=p.lang,r=k.numericSymbols;k=k.numericSymbolMagnitude||1E3;var h=c.logarithmic?Math.abs(a):c.tickInterval,q=r&&r.length;if(c.categories)var L=""+this.value;else if(e)L=d.dateFormat(e,a);else if(q&&1E3<=h)for(;q--&&"undefined"===typeof L;)c=Math.pow(k,q+1),h>=c&&0===10*a%c&&null!==r[q]&&0!==a&&(L=b(a/c,-1)+r[q]);"undefined"===typeof L&&(L=1E4<=Math.abs(a)?b(a,-1):b(a,
|
||||
-1,void 0,""));return L};a.prototype.getSeriesExtremes=function(){var b=this,c=b.chart,a;q(this,"getSeriesExtremes",null,function(){b.hasVisibleSeries=!1;b.dataMin=b.dataMax=b.threshold=null;b.softThreshold=!b.isXAxis;b.stacking&&b.stacking.buildStacks();b.series.forEach(function(d){if(d.visible||!c.options.chart.ignoreHiddenSeries){var e=d.options,k=e.threshold;b.hasVisibleSeries=!0;b.positiveValuesOnly&&0>=k&&(k=null);if(b.isXAxis){if(e=d.xData,e.length){e=b.logarithmic?e.filter(b.validatePositiveValue):
|
||||
e;a=d.getXExtremes(e);var r=a.min;var h=a.max;g(r)||r instanceof Date||(e=e.filter(g),a=d.getXExtremes(e),r=a.min,h=a.max);e.length&&(b.dataMin=Math.min(K(b.dataMin,r),r),b.dataMax=Math.max(K(b.dataMax,h),h))}}else if(d=d.applyExtremes(),g(d.dataMin)&&(r=d.dataMin,b.dataMin=Math.min(K(b.dataMin,r),r)),g(d.dataMax)&&(h=d.dataMax,b.dataMax=Math.max(K(b.dataMax,h),h)),n(k)&&(b.threshold=k),!e.softThreshold||b.positiveValuesOnly)b.softThreshold=!1}})});q(this,"afterGetSeriesExtremes")};a.prototype.translate=
|
||||
function(b,c,a,d,e,k){var r=this.linkedParent||this,h=d&&r.old?r.old.min:r.min,q=r.minPixelPadding;e=(r.isOrdinal||r.brokenAxis&&r.brokenAxis.hasBreaks||r.logarithmic&&e)&&r.lin2val;var f=1,L=0;d=d&&r.old?r.old.transA:r.transA;d||(d=r.transA);a&&(f*=-1,L=r.len);r.reversed&&(f*=-1,L-=f*(r.sector||r.len));c?(k=(b*f+L-q)/d+h,e&&(k=r.lin2val(k))):(e&&(b=r.val2lin(b)),b=f*(b-h)*d,k=g(h)?(r.isRadial?b:t(b))+L+f*q+(g(k)?d*k:0):void 0);return k};a.prototype.toPixels=function(b,c){return this.translate(b,
|
||||
!1,!this.horiz,null,!0)+(c?0:this.pos)};a.prototype.toValue=function(b,c){return this.translate(b-(c?0:this.pos),!0,!this.horiz,null,!0)};a.prototype.getPlotLinePath=function(b){function c(b,c,a){if("pass"!==m&&b<c||b>a)m?b=h(b,c,a):w=!0;return b}var a=this,d=a.chart,e=a.left,k=a.top,r=b.old,f=b.value,L=b.lineWidth,l=r&&d.oldChartHeight||d.chartHeight,x=r&&d.oldChartWidth||d.chartWidth,D=a.transB,n=b.translatedValue,m=b.force,p,t,A,P,w;b={value:f,lineWidth:L,old:r,force:m,acrossPanes:b.acrossPanes,
|
||||
translatedValue:n};q(this,"getPlotLinePath",b,function(b){n=K(n,a.translate(f,null,null,r));n=h(n,-1E5,1E5);p=A=Math.round(n+D);t=P=Math.round(l-n-D);g(n)?a.horiz?(t=k,P=l-a.bottom,p=A=c(p,e,e+a.width)):(p=e,A=x-a.right,t=P=c(t,k,k+a.height)):(w=!0,m=!1);b.path=w&&!m?null:d.renderer.crispLine([["M",p,t],["L",A,P]],L||1)});return b.path};a.prototype.getLinearTickPositions=function(b,c,a){var d=t(Math.floor(c/b)*b);a=t(Math.ceil(a/b)*b);var g=[],e;t(d+b)===d&&(e=20);if(this.single)return[c];for(c=d;c<=
|
||||
a;){g.push(c);c=t(c+b,e);if(c===k)break;var k=c}return g};a.prototype.getMinorTickInterval=function(){var b=this.options;return!0===b.minorTicks?K(b.minorTickInterval,"auto"):!1===b.minorTicks?null:b.minorTickInterval};a.prototype.getMinorTickPositions=function(){var b=this.options,c=this.tickPositions,a=this.minorTickInterval,d=this.pointRangePadding||0,g=this.min-d;d=this.max+d;var e=d-g,k=[];if(e&&e/a<this.len/3){var r=this.logarithmic;if(r)this.paddedTicks.forEach(function(b,c,d){c&&k.push.apply(k,
|
||||
r.getLogTickPositions(a,d[c-1],d[c],!0))});else if(this.dateTime&&"auto"===this.getMinorTickInterval())k=k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(a),g,d,b.startOfWeek));else for(b=g+(c[0]-g)%a;b<=d&&b!==k[0];b+=a)k.push(b)}0!==k.length&&this.trimTicks(k);return k};a.prototype.adjustForMinRange=function(){var b=this.options,c=this.logarithmic,a=this.min,g=this.max,e=0,k,r,h,q;this.isXAxis&&"undefined"===typeof this.minRange&&!c&&(n(b.min)||n(b.max)||n(b.floor)||n(b.ceiling)?
|
||||
this.minRange=null:(this.series.forEach(function(b){h=b.xData;q=b.xIncrement?1:h.length-1;if(1<h.length)for(k=q;0<k;k--)if(r=h[k]-h[k-1],!e||r<e)e=r}),this.minRange=Math.min(5*e,this.dataMax-this.dataMin)));if(g-a<this.minRange){var f=this.dataMax-this.dataMin>=this.minRange;var x=this.minRange;var D=(x-g+a)/2;D=[a-D,K(b.min,a-D)];f&&(D[2]=this.logarithmic?this.logarithmic.log2lin(this.dataMin):this.dataMin);a=d(D);g=[a+x,K(b.max,a+x)];f&&(g[2]=c?c.log2lin(this.dataMax):this.dataMax);g=l(g);g-a<x&&
|
||||
(D[0]=g-x,D[1]=K(b.min,g-x),a=d(D))}this.min=a;this.max=g};a.prototype.getClosest=function(){var b;this.categories?b=1:this.series.forEach(function(c){var a=c.closestPointRange,d=c.visible||!c.chart.options.chart.ignoreHiddenSeries;!c.noSharedTooltip&&n(a)&&d&&(b=n(b)?Math.min(b,a):a)});return b};a.prototype.nameToX=function(b){var a=c(this.options.categories),d=a?this.categories:this.names,g=b.options.x;b.series.requireSorting=!1;n(g)||(g=this.options.uniqueNames&&d?a?d.indexOf(b.name):K(d.keys[b.name],
|
||||
-1):b.series.autoIncrement());if(-1===g){if(!a&&d)var e=d.length}else e=g;"undefined"!==typeof e&&(this.names[e]=b.name,this.names.keys[b.name]=e);return e};a.prototype.updateNames=function(){var b=this,c=this.names;0<c.length&&(Object.keys(c.keys).forEach(function(b){delete c.keys[b]}),c.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(c){c.xIncrement=null;if(!c.points||c.isDirtyData)b.max=Math.max(b.max,c.xData.length-1),c.processData(),c.generatePoints();c.data.forEach(function(a,
|
||||
d){if(a&&a.options&&"undefined"!==typeof a.name){var g=b.nameToX(a);"undefined"!==typeof g&&g!==a.x&&(a.x=g,c.xData[d]=g)}})}))};a.prototype.setAxisTranslation=function(){var c=this,a=c.max-c.min,d=c.linkedParent,g=!!c.categories,e=c.isXAxis,k=c.axisPointRange||0,r=0,h=0,f=c.transA;if(e||g||k){var x=c.getClosest();d?(r=d.minPointOffset,h=d.pointRangePadding):c.series.forEach(function(a){var d=g?1:e?K(a.options.pointRange,x,0):c.axisPointRange||0,q=a.options.pointPlacement;k=Math.max(k,d);if(!c.single||
|
||||
g)a=a.is("xrange")?!e:e,r=Math.max(r,a&&b(q)?0:d/2),h=Math.max(h,a&&"on"===q?0:d)});d=c.ordinal&&c.ordinal.slope&&x?c.ordinal.slope/x:1;c.minPointOffset=r*=d;c.pointRangePadding=h*=d;c.pointRange=Math.min(k,c.single&&g?1:a);e&&(c.closestPointRange=x)}c.translationSlope=c.transA=f=c.staticScale||c.len/(a+h||1);c.transB=c.horiz?c.left:c.bottom;c.minPixelPadding=f*r;q(this,"afterSetAxisTranslation")};a.prototype.minFromRange=function(){return this.max-this.range};a.prototype.setTickInterval=function(b){var c=
|
||||
this.chart,a=this.logarithmic,d=this.options,e=this.isXAxis,r=this.isLinked,h=d.tickPixelInterval,f=this.categories,l=this.softThreshold,D=d.maxPadding,m=d.minPadding,L=g(d.tickInterval)&&0<=d.tickInterval?d.tickInterval:void 0,p=g(this.threshold)?this.threshold:null;this.dateTime||f||r||this.getTickAmount();var A=K(this.userMin,d.min);var P=K(this.userMax,d.max);if(r){this.linkedParent=c[this.coll][d.linkedTo];var w=this.linkedParent.getExtremes();this.min=K(w.min,w.dataMin);this.max=K(w.max,w.dataMax);
|
||||
d.type!==this.linkedParent.options.type&&y(11,1,c)}else{if(l&&n(p))if(this.dataMin>=p)w=p,m=0;else if(this.dataMax<=p){var v=p;D=0}this.min=K(A,w,this.dataMin);this.max=K(P,v,this.dataMax)}a&&(this.positiveValuesOnly&&!b&&0>=Math.min(this.min,K(this.dataMin,this.min))&&y(10,1,c),this.min=t(a.log2lin(this.min),16),this.max=t(a.log2lin(this.max),16));this.range&&n(this.max)&&(this.userMin=this.min=A=Math.max(this.dataMin,this.minFromRange()),this.userMax=P=this.max,this.range=null);q(this,"foundExtremes");
|
||||
this.beforePadding&&this.beforePadding();this.adjustForMinRange();!(f||this.axisPointRange||this.stacking&&this.stacking.usePercentage||r)&&n(this.min)&&n(this.max)&&(c=this.max-this.min)&&(!n(A)&&m&&(this.min-=c*m),!n(P)&&D&&(this.max+=c*D));g(this.userMin)||(g(d.softMin)&&d.softMin<this.min&&(this.min=A=d.softMin),g(d.floor)&&(this.min=Math.max(this.min,d.floor)));g(this.userMax)||(g(d.softMax)&&d.softMax>this.max&&(this.max=P=d.softMax),g(d.ceiling)&&(this.max=Math.min(this.max,d.ceiling)));l&&
|
||||
n(this.dataMin)&&(p=p||0,!n(A)&&this.min<p&&this.dataMin>=p?this.min=this.options.minRange?Math.min(p,this.max-this.minRange):p:!n(P)&&this.max>p&&this.dataMax<=p&&(this.max=this.options.minRange?Math.max(p,this.min+this.minRange):p));g(this.min)&&g(this.max)&&!this.chart.polar&&this.min>this.max&&(n(this.options.min)?this.max=this.min:n(this.options.max)&&(this.min=this.max));this.tickInterval=this.min===this.max||"undefined"===typeof this.min||"undefined"===typeof this.max?1:r&&this.linkedParent&&
|
||||
!L&&h===this.linkedParent.options.tickPixelInterval?L=this.linkedParent.tickInterval:K(L,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,f?1:(this.max-this.min)*h/Math.max(this.len,h));if(e&&!b){var Q=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach(function(b){b.forceCrop=b.forceCropping&&b.forceCropping();b.processData(Q)});q(this,"postProcessData",{hasExtemesChanged:Q})}this.setAxisTranslation();q(this,"initialAxisTranslation");
|
||||
this.pointRange&&!L&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));b=K(d.minTickInterval,this.dateTime&&!this.series.some(function(b){return b.noSharedTooltip})?this.closestPointRange:0);!L&&this.tickInterval<b&&(this.tickInterval=b);this.dateTime||this.logarithmic||L||(this.tickInterval=x(this.tickInterval,void 0,k(this.tickInterval),K(d.allowDecimals,.5>this.tickInterval||void 0!==this.tickAmount),!!this.tickAmount));this.tickAmount||(this.tickInterval=this.unsquish());this.setTickPositions()};
|
||||
a.prototype.setTickPositions=function(){var b=this.options,c=b.tickPositions,a=this.getMinorTickInterval(),d=this.hasVerticalPanning(),g="colorAxis"===this.coll,e=(g||!d)&&b.startOnTick;d=(g||!d)&&b.endOnTick;g=b.tickPositioner;this.tickmarkOffset=this.categories&&"between"===b.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a&&this.tickInterval?this.tickInterval/5:a;this.single=this.min===this.max&&n(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==
|
||||
b.allowDecimals);this.tickPositions=a=c&&c.slice();!a&&(this.ordinal&&this.ordinal.positions||!((this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))?a=this.dateTime?this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,b.units),this.min,this.max,b.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0):this.logarithmic?this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,
|
||||
this.max):(a=[this.min,this.max],y(19,!1,this.chart)),a.length>this.len&&(a=[a[0],a.pop()],a[0]===a[1]&&(a.length=1)),this.tickPositions=a,g&&(g=g.apply(this,[this.min,this.max])))&&(this.tickPositions=a=g);this.paddedTicks=a.slice(0);this.trimTicks(a,e,d);this.isLinked||(this.single&&2>a.length&&!this.categories&&!this.series.some(function(b){return b.is("heatmap")&&"between"===b.options.pointPlacement})&&(this.min-=.5,this.max+=.5),c||g||this.adjustTickAmount());q(this,"afterSetTickPositions")};
|
||||
a.prototype.trimTicks=function(b,c,a){var d=b[0],g=b[b.length-1],e=!this.isOrdinal&&this.minPointOffset||0;q(this,"trimTicks");if(!this.isLinked){if(c&&-Infinity!==d)this.min=d;else for(;this.min-e>b[0];)b.shift();if(a)this.max=g;else for(;this.max+e<b[b.length-1];)b.pop();0===b.length&&n(d)&&!this.options.tickPositions&&b.push((g+d)/2)}};a.prototype.alignToOthers=function(){var b=this,c=[this],a=b.options,d="yAxis"===this.coll&&this.chart.options.chart.alignThresholds,e=[],k;b.thresholdAlignment=
|
||||
void 0;if((!1!==this.chart.options.chart.alignTicks&&a.alignTicks||d)&&!1!==a.startOnTick&&!1!==a.endOnTick&&!b.logarithmic){var r=function(b){var c=b.options;return[b.horiz?c.left:c.top,c.width,c.height,c.pane].join()},h=r(this);this.chart[this.coll].forEach(function(a){var d=a.series;d.length&&d.some(function(b){return b.visible})&&a!==b&&r(a)===h&&(k=!0,c.push(a))})}if(k&&d){c.forEach(function(c){c=c.getThresholdAlignment(b);g(c)&&e.push(c)});var q=1<e.length?e.reduce(function(b,c){return b+c},
|
||||
0)/e.length:void 0;c.forEach(function(b){b.thresholdAlignment=q})}return k};a.prototype.getThresholdAlignment=function(b){(!g(this.dataMin)||this!==b&&this.series.some(function(b){return b.isDirty||b.isDirtyData}))&&this.getSeriesExtremes();if(g(this.threshold))return b=h((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1),this.options.reversed&&(b=1-b),b};a.prototype.getTickAmount=function(){var b=this.options,c=b.tickPixelInterval,a=b.tickAmount;!n(b.tickInterval)&&!a&&
|
||||
this.len<c&&!this.isRadial&&!this.logarithmic&&b.startOnTick&&b.endOnTick&&(a=2);!a&&this.alignToOthers()&&(a=Math.ceil(this.len/c)+1);4>a&&(this.finalTickAmt=a,a=5);this.tickAmount=a};a.prototype.adjustTickAmount=function(){var b=this,c=b.finalTickAmt,a=b.max,d=b.min,e=b.options,k=b.tickPositions,r=b.tickAmount,h=b.thresholdAlignment,q=k&&k.length,f=K(b.threshold,b.softThreshold?0:null);var x=b.tickInterval;if(g(h)){var l=.5>h?Math.ceil(h*(r-1)):Math.floor(h*(r-1));e.reversed&&(l=r-1-l)}if(b.hasData()&&
|
||||
g(d)&&g(a)){h=function(){b.transA*=(q-1)/(r-1);b.min=e.startOnTick?k[0]:Math.min(d,k[0]);b.max=e.endOnTick?k[k.length-1]:Math.max(a,k[k.length-1])};if(g(l)&&g(b.threshold)){for(;k[l]!==f||k.length!==r||k[0]>d||k[k.length-1]<a;){k.length=0;for(k.push(b.threshold);k.length<r;)void 0===k[l]||k[l]>b.threshold?k.unshift(t(k[0]-x)):k.push(t(k[k.length-1]+x));if(x>8*b.tickInterval)break;x*=2}h()}else if(q<r){for(;k.length<r;)k.length%2||d===f?k.push(t(k[k.length-1]+x)):k.unshift(t(k[0]-x));h()}else q>r&&
|
||||
(b.tickInterval*=2,b.setTickPositions());if(n(c)){for(x=f=k.length;x--;)(3===c&&1===x%2||2>=c&&0<x&&x<f-1)&&k.splice(x,1);b.finalTickAmt=void 0}}};a.prototype.setScale=function(){var b=!1,c=!1;this.series.forEach(function(a){b=b||a.isDirtyData||a.isDirty;c=c||a.xAxis&&a.xAxis.isDirty||!1});this.setAxisSize();var a=this.len!==(this.old&&this.old.len);a||b||c||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?
|
||||
(this.stacking&&this.stacking.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.isDirty||(this.isDirty=a||this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max))):this.stacking&&this.stacking.cleanStacks();b&&this.panningState&&(this.panningState.isDirty=!0);q(this,"afterSetScale")};a.prototype.setExtremes=function(b,c,a,d,g){var e=this,k=e.chart;a=K(a,!0);e.series.forEach(function(b){delete b.kdTree});g=A(g,{min:b,max:c});q(e,"setExtremes",g,
|
||||
function(){e.userMin=b;e.userMax=c;e.eventArgs=g;a&&k.redraw(d)})};a.prototype.zoom=function(b,c){var a=this,d=this.dataMin,g=this.dataMax,e=this.options,k=Math.min(d,K(e.min,d)),r=Math.max(g,K(e.max,g));b={newMin:b,newMax:c};q(this,"zoom",b,function(b){var c=b.newMin,e=b.newMax;if(c!==a.min||e!==a.max)a.allowZoomOutside||(n(d)&&(c<k&&(c=k),c>r&&(c=r)),n(g)&&(e<k&&(e=k),e>r&&(e=r))),a.displayBtn="undefined"!==typeof c||"undefined"!==typeof e,a.setExtremes(c,e,!1,void 0,{trigger:"zoom"});b.zoomed=
|
||||
!0});return b.zoomed};a.prototype.setAxisSize=function(){var b=this.chart,c=this.options,a=c.offsets||[0,0,0,0],d=this.horiz,g=this.width=Math.round(P(K(c.width,b.plotWidth-a[3]+a[1]),b.plotWidth)),e=this.height=Math.round(P(K(c.height,b.plotHeight-a[0]+a[2]),b.plotHeight)),k=this.top=Math.round(P(K(c.top,b.plotTop+a[0]),b.plotHeight,b.plotTop));c=this.left=Math.round(P(K(c.left,b.plotLeft+a[3]),b.plotWidth,b.plotLeft));this.bottom=b.chartHeight-e-k;this.right=b.chartWidth-g-c;this.len=Math.max(d?
|
||||
g:e,0);this.pos=d?c:k};a.prototype.getExtremes=function(){var b=this.logarithmic;return{min:b?t(b.lin2log(this.min)):this.min,max:b?t(b.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}};a.prototype.getThreshold=function(b){var c=this.logarithmic,a=c?c.lin2log(this.min):this.min;c=c?c.lin2log(this.max):this.max;null===b||-Infinity===b?b=a:Infinity===b?b=c:a>b?b=a:c<b&&(b=c);return this.translate(b,0,1,0,1)};a.prototype.autoLabelAlign=
|
||||
function(b){var c=(K(b,0)-90*this.side+720)%360;b={align:"center"};q(this,"autoLabelAlign",b,function(b){15<c&&165>c?b.align="right":195<c&&345>c&&(b.align="left")});return b.align};a.prototype.tickSize=function(b){var c=this.options,a=K(c["tick"===b?"tickWidth":"minorTickWidth"],"tick"===b&&this.isXAxis&&!this.categories?1:0),d=c["tick"===b?"tickLength":"minorTickLength"];if(a&&d){"inside"===c[b+"Position"]&&(d=-d);var g=[d,a]}b={tickSize:g};q(this,"afterTickSize",b);return b.tickSize};a.prototype.labelMetrics=
|
||||
function(){var b=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[b]&&this.ticks[b].label)};a.prototype.unsquish=function(){var b=this.options.labels,c=this.horiz,a=this.tickInterval,d=this.len/(((this.categories?1:0)+this.max-this.min)/a),k=b.rotation,r=this.labelMetrics(),h=Math.max(this.max-this.min,0),q=function(b){var c=b/(d||1);c=1<c?Math.ceil(c):1;c*a>h&&Infinity!==b&&Infinity!==d&&h&&(c=Math.ceil(h/a));return t(c*
|
||||
a)},f=a,x,l,D=Number.MAX_VALUE;if(c){if(!b.staggerLines&&!b.step)if(g(k))var n=[k];else d<b.autoRotationLimit&&(n=b.autoRotation);n&&n.forEach(function(b){if(b===k||b&&-90<=b&&90>=b){l=q(Math.abs(r.h/Math.sin(e*b)));var c=l+Math.abs(b/360);c<D&&(D=c,x=b,f=l)}})}else b.step||(f=q(r.h));this.autoRotation=n;this.labelRotation=K(x,g(k)?k:0);return f};a.prototype.getSlotWidth=function(b){var c=this.chart,a=this.horiz,d=this.options.labels,e=Math.max(this.tickPositions.length-(this.categories?0:1),1),k=
|
||||
c.margin[3];if(b&&g(b.slotWidth))return b.slotWidth;if(a&&2>d.step)return d.rotation?0:(this.staggerLines||1)*this.len/e;if(!a){b=d.style.width;if(void 0!==b)return parseInt(String(b),10);if(k)return k-c.spacing[3]}return.33*c.chartWidth};a.prototype.renderUnsquish=function(){var c=this.chart,a=c.renderer,d=this.tickPositions,g=this.ticks,e=this.options.labels,k=e.style,r=this.horiz,h=this.getSlotWidth(),q=Math.max(1,Math.round(h-2*e.padding)),f={},x=this.labelMetrics(),l=k.textOverflow,D=0;b(e.rotation)||
|
||||
(f.rotation=e.rotation||0);d.forEach(function(b){b=g[b];b.movedLabel&&b.replaceMovedLabel();b&&b.label&&b.label.textPxLength>D&&(D=b.label.textPxLength)});this.maxLabelLength=D;if(this.autoRotation)D>q&&D>x.h?f.rotation=this.labelRotation:this.labelRotation=0;else if(h){var n=q;if(!l){var m="clip";for(q=d.length;!r&&q--;){var p=d[q];if(p=g[p].label)p.styles&&"ellipsis"===p.styles.textOverflow?p.css({textOverflow:"clip"}):p.textPxLength>h&&p.css({width:h+"px"}),p.getBBox().height>this.len/d.length-
|
||||
(x.h-x.f)&&(p.specificTextOverflow="ellipsis")}}}f.rotation&&(n=D>.5*c.chartHeight?.33*c.chartHeight:D,l||(m="ellipsis"));if(this.labelAlign=e.align||this.autoLabelAlign(this.labelRotation))f.align=this.labelAlign;d.forEach(function(b){var c=(b=g[b])&&b.label,a=k.width,d={};c&&(c.attr(f),b.shortenLabel?b.shortenLabel():n&&!a&&"nowrap"!==k.whiteSpace&&(n<c.textPxLength||"SPAN"===c.element.tagName)?(d.width=n+"px",l||(d.textOverflow=c.specificTextOverflow||m),c.css(d)):c.styles&&c.styles.width&&!d.width&&
|
||||
!a&&c.css({width:null}),delete c.specificTextOverflow,b.rotation=f.rotation)},this);this.tickRotCorr=a.rotCorr(x.b,this.labelRotation||0,0!==this.side)};a.prototype.hasData=function(){return this.series.some(function(b){return b.hasData()})||this.options.showEmpty&&n(this.min)&&n(this.max)};a.prototype.addTitle=function(b){var c=this.chart.renderer,a=this.horiz,d=this.opposite,g=this.options.title,e=this.chart.styledMode,k;this.axisTitle||((k=g.textAlign)||(k=(a?{low:"left",middle:"center",high:"right"}:
|
||||
{low:d?"right":"left",middle:"center",high:d?"left":"right"})[g.align]),this.axisTitle=c.text(g.text||"",0,0,g.useHTML).attr({zIndex:7,rotation:g.rotation,align:k}).addClass("highcharts-axis-title"),e||this.axisTitle.css(r(g.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0);e||g.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"});this.axisTitle[b?"show":"hide"](b)};a.prototype.generateTick=function(b){var c=this.ticks;c[b]?c[b].addLabel():c[b]=new I(this,b)};a.prototype.getOffset=
|
||||
function(){var b=this,c=this,a=c.chart,d=c.horiz,g=c.options,e=c.side,k=c.ticks,r=c.tickPositions,h=c.coll,f=c.axisParent,x=a.renderer,l=a.inverted&&!c.isZAxis?[1,0,3,2][e]:e,m=c.hasData(),p=g.title,t=g.labels,A=a.axisOffset;a=a.clipOffset;var P=[-1,1,1,-1][e],w=g.className,y,v=0,ja=0,ca=0;c.showAxis=y=m||g.showEmpty;c.staggerLines=c.horiz&&t.staggerLines||void 0;if(!c.axisGroup){var Q=function(c,a,d){return x.g(c).attr({zIndex:d}).addClass("highcharts-"+h.toLowerCase()+a+" "+(b.isRadial?"highcharts-radial-axis"+
|
||||
a+" ":"")+(w||"")).add(f)};c.gridGroup=Q("grid","-grid",g.gridZIndex);c.axisGroup=Q("axis","",g.zIndex);c.labelGroup=Q("axis-labels","-labels",t.zIndex)}m||c.isLinked?(r.forEach(function(b){c.generateTick(b)}),c.renderUnsquish(),c.reserveSpaceDefault=0===e||2===e||{1:"left",3:"right"}[e]===c.labelAlign,K(t.reserveSpace,"center"===c.labelAlign?!0:null,c.reserveSpaceDefault)&&r.forEach(function(b){ca=Math.max(k[b].getLabelSize(),ca)}),c.staggerLines&&(ca*=c.staggerLines),c.labelOffset=ca*(c.opposite?
|
||||
-1:1)):D(k,function(b,c){b.destroy();delete k[c]});if(p&&p.text&&!1!==p.enabled&&(c.addTitle(y),y&&!1!==p.reserveSpace)){c.titleOffset=v=c.axisTitle.getBBox()[d?"height":"width"];var O=p.offset;ja=n(O)?0:K(p.margin,d?5:10)}c.renderLine();c.offset=P*K(g.offset,A[e]?A[e]+(g.margin||0):0);c.tickRotCorr=c.tickRotCorr||{x:0,y:0};p=0===e?-c.labelMetrics().h:2===e?c.tickRotCorr.y:0;m=Math.abs(ca)+ja;ca&&(m=m-p+P*(d?K(t.y,c.tickRotCorr.y+8*P):t.x));c.axisTitleMargin=K(O,m);c.getMaxLabelDimensions&&(c.maxLabelDimensions=
|
||||
c.getMaxLabelDimensions(k,r));"colorAxis"!==h&&(d=this.tickSize("tick"),A[e]=Math.max(A[e],(c.axisTitleMargin||0)+v+P*c.offset,m,r&&r.length&&d?d[0]+P*c.offset:0),g=!c.axisLine||g.offset?0:2*Math.floor(c.axisLine.strokeWidth()/2),a[l]=Math.max(a[l],g));q(this,"afterGetOffset")};a.prototype.getLinePath=function(b){var c=this.chart,a=this.opposite,d=this.offset,g=this.horiz,e=this.left+(a?this.width:0)+d;d=c.chartHeight-this.bottom-(a?this.height:0)+d;a&&(b*=-1);return c.renderer.crispLine([["M",g?
|
||||
this.left:e,g?d:this.top],["L",g?c.chartWidth-this.right:e,g?d:c.chartHeight-this.bottom]],b)};a.prototype.renderLine=function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))};a.prototype.getTitlePosition=function(){var b=this.horiz,c=this.left,a=this.top,d=this.len,g=this.options.title,e=b?c:a,k=this.opposite,r=
|
||||
this.offset,h=g.x,f=g.y,x=this.axisTitle,l=this.chart.renderer.fontMetrics(g.style.fontSize,x);x=Math.max(x.getBBox(null,0).height-l.h-1,0);d={low:e+(b?0:d),middle:e+d/2,high:e+(b?d:0)}[g.align];c=(b?a+this.height:c)+(b?1:-1)*(k?-1:1)*this.axisTitleMargin+[-x,x,l.f,-x][this.side];b={x:b?d+h:c+(k?this.width:0)+r+h,y:b?c+f-(k?this.height:0)+r:d+f};q(this,"afterGetTitlePosition",{titlePosition:b});return b};a.prototype.renderMinorTick=function(b,c){var a=this.minorTicks;a[b]||(a[b]=new I(this,b,"minor"));
|
||||
c&&a[b].isNew&&a[b].render(null,!0);a[b].render(null,!1,1)};a.prototype.renderTick=function(b,c,a){var d=this.ticks;if(!this.isLinked||b>=this.min&&b<=this.max||this.grid&&this.grid.isColumn)d[b]||(d[b]=new I(this,b)),a&&d[b].isNew&&d[b].render(c,!0,-1),d[b].render(c)};a.prototype.render=function(){var b=this,c=b.chart,a=b.logarithmic,d=b.options,e=b.isLinked,k=b.tickPositions,r=b.axisTitle,h=b.ticks,f=b.minorTicks,x=b.alternateBands,l=d.stackLabels,n=d.alternateGridColor,m=b.tickmarkOffset,p=b.axisLine,
|
||||
t=b.showAxis,K=z(c.renderer.globalAnimation),A,P;b.labelEdge.length=0;b.overlap=!1;[h,f,x].forEach(function(b){D(b,function(b){b.isActive=!1})});if(b.hasData()||e){var w=b.chart.hasRendered&&b.old&&g(b.old.min);b.minorTickInterval&&!b.categories&&b.getMinorTickPositions().forEach(function(c){b.renderMinorTick(c,w)});k.length&&(k.forEach(function(c,a){b.renderTick(c,a,w)}),m&&(0===b.min||b.single)&&(h[-1]||(h[-1]=new I(b,-1,null,!0)),h[-1].render(-1)));n&&k.forEach(function(d,g){P="undefined"!==typeof k[g+
|
||||
1]?k[g+1]+m:b.max-m;0===g%2&&d<b.max&&P<=b.max+(c.polar?-m:m)&&(x[d]||(x[d]=new H.PlotLineOrBand(b)),A=d+m,x[d].options={from:a?a.lin2log(A):A,to:a?a.lin2log(P):P,color:n,className:"highcharts-alternate-grid"},x[d].render(),x[d].isActive=!0)});b._addedPlotLB||(b._addedPlotLB=!0,(d.plotLines||[]).concat(d.plotBands||[]).forEach(function(c){b.addPlotBandOrLine(c)}))}[h,f,x].forEach(function(b){var a=[],d=K.duration;D(b,function(b,c){b.isActive||(b.render(c,!1,0),b.isActive=!1,a.push(c))});W(function(){for(var c=
|
||||
a.length;c--;)b[a[c]]&&!b[a[c]].isActive&&(b[a[c]].destroy(),delete b[a[c]])},b!==x&&c.hasRendered&&d?d:0)});p&&(p[p.isPlaced?"animate":"attr"]({d:this.getLinePath(p.strokeWidth())}),p.isPlaced=!0,p[t?"show":"hide"](t));r&&t&&(d=b.getTitlePosition(),g(d.y)?(r[r.isNew?"attr":"animate"](d),r.isNew=!1):(r.attr("y",-9999),r.isNew=!0));l&&l.enabled&&b.stacking&&b.stacking.renderStackTotals();b.old={len:b.len,max:b.max,min:b.min,transA:b.transA,userMax:b.userMax,userMin:b.userMin};b.isDirty=!1;q(this,"afterRender")};
|
||||
a.prototype.redraw=function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(b){b.render()}));this.series.forEach(function(b){b.isDirty=!0})};a.prototype.getKeepProps=function(){return this.keepProps||a.keepProps};a.prototype.destroy=function(b){var c=this,a=c.plotLinesAndBands,d=this.eventOptions;q(this,"destroy",{keepEvents:b});b||Q(c);[c.ticks,c.minorTicks,c.alternateBands].forEach(function(b){v(b)});if(a)for(b=a.length;b--;)a[b].destroy();"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(b){c[b]&&
|
||||
(c[b]=c[b].destroy())});for(var g in c.plotLinesAndBandsGroups)c.plotLinesAndBandsGroups[g]=c.plotLinesAndBandsGroups[g].destroy();D(c,function(b,a){-1===c.getKeepProps().indexOf(a)&&delete c[a]});this.eventOptions=d};a.prototype.drawCrosshair=function(b,c){var a=this.crosshair,d=K(a&&a.snap,!0),g=this.chart,e,k=this.cross;q(this,"drawCrosshair",{e:b,point:c});b||(b=this.cross&&this.cross.e);if(a&&!1!==(n(c)||!d)){d?n(c)&&(e=K("colorAxis"!==this.coll?c.crosshairPos:null,this.isXAxis?c.plotX:this.len-
|
||||
c.plotY)):e=b&&(this.horiz?b.chartX-this.pos:this.len-b.chartY+this.pos);if(n(e)){var r={value:c&&(this.isXAxis?c.x:K(c.stackY,c.y)),translatedValue:e};g.polar&&A(r,{isCrosshair:!0,chartX:b&&b.chartX,chartY:b&&b.chartY,point:c});r=this.getPlotLinePath(r)||null}if(!n(r)){this.hideCrosshair();return}d=this.categories&&!this.isRadial;k||(this.cross=k=g.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(d?"category ":"thin ")+(a.className||"")).attr({zIndex:K(a.zIndex,2)}).add(),g.styledMode||
|
||||
(k.attr({stroke:a.color||(d?C.parse("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":K(a.width,1)}).css({"pointer-events":"none"}),a.dashStyle&&k.attr({dashstyle:a.dashStyle})));k.show().attr({d:r});d&&!a.width&&k.attr({"stroke-width":this.transA});this.cross.e=b}else this.hideCrosshair();q(this,"afterDrawCrosshair",{e:b,point:c})};a.prototype.hideCrosshair=function(){this.cross&&this.cross.hide();q(this,"afterHideCrosshair")};a.prototype.hasVerticalPanning=function(){var b=this.chart.options.chart.panning;
|
||||
return!!(b&&b.enabled&&/y/.test(b.type))};a.prototype.validatePositiveValue=function(b){return g(b)&&0<b};a.prototype.update=function(b,c){var a=this.chart;b=r(this.userOptions,b);this.destroy(!0);this.init(a,b);a.isDirtyBox=!0;K(c,!0)&&a.redraw()};a.prototype.remove=function(b){for(var c=this.chart,a=this.coll,d=this.series,g=d.length;g--;)d[g]&&d[g].remove(!1);w(c.axes,this);w(c[a],this);c[a].forEach(function(b,c){b.options.index=b.userOptions.index=c});this.destroy();c.isDirtyBox=!0;K(b,!0)&&c.redraw()};
|
||||
a.prototype.setTitle=function(b,c){this.update({title:b},c)};a.prototype.setCategories=function(b,c){this.update({categories:b},c)};a.defaultOptions=f.defaultXAxisOptions;a.keepProps="extKey hcEvents names series userMax userMin".split(" ");return a}();"";return a});M(f,"Core/Axis/DateTimeAxis.js",[f["Core/Utilities.js"]],function(a){var f=a.addEvent,C=a.getMagnitude,G=a.normalizeTickInterval,u=a.timeUnits,H;(function(a){function B(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}
|
||||
function z(a){"datetime"!==a.userOptions.type?this.dateTime=void 0:this.dateTime||(this.dateTime=new m(this))}var p=[];a.compose=function(a){-1===p.indexOf(a)&&(p.push(a),a.keepProps.push("dateTime"),a.prototype.getTimeTicks=B,f(a,"init",z));return a};var m=function(){function a(a){this.axis=a}a.prototype.normalizeTimeTickInterval=function(a,e){var d=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],
|
||||
["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];e=d[d.length-1];var f=u[e[0]],l=e[1],m;for(m=0;m<d.length&&!(e=d[m],f=u[e[0]],l=e[1],d[m+1]&&a<=(f*l[l.length-1]+u[d[m+1][0]])/2);m++);f===u.year&&a<5*f&&(l=[1,2,5]);a=G(a/f,l,"year"===e[0]?Math.max(C(a/f),1):1);return{unitRange:f,count:a,unitName:e[0]}};a.prototype.getXDateFormat=function(a,e){var d=this.axis;return d.closestPointRange?d.chart.time.getDateFormat(d.closestPointRange,a,d.options.startOfWeek,e)||e.year:e.day};return a}();a.Additions=
|
||||
m})(H||(H={}));return H});M(f,"Core/Axis/LogarithmicAxis.js",[f["Core/Utilities.js"]],function(a){var f=a.addEvent,C=a.getMagnitude,G=a.normalizeTickInterval,u=a.pick,H;(function(a){function B(a){var d=this.logarithmic;"logarithmic"!==a.userOptions.type?this.logarithmic=void 0:d||(this.logarithmic=new m(this))}function z(){var a=this.logarithmic;a&&(this.lin2val=function(d){return a.lin2log(d)},this.val2lin=function(d){return a.log2lin(d)})}var p=[];a.compose=function(a){-1===p.indexOf(a)&&(p.push(a),
|
||||
a.keepProps.push("logarithmic"),f(a,"init",B),f(a,"afterInit",z));return a};var m=function(){function a(a){this.axis=a}a.prototype.getLogTickPositions=function(a,e,h,f){var d=this.axis,l=d.len,m=d.options,p=[];f||(this.minorAutoInterval=void 0);if(.5<=a)a=Math.round(a),p=d.getLinearTickPositions(a,e,h);else if(.08<=a){var t=Math.floor(e),q,k=m=void 0;for(l=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];t<h+1&&!k;t++){var c=l.length;for(q=0;q<c&&!k;q++){var g=this.log2lin(this.lin2log(t)*l[q]);
|
||||
g>e&&(!f||m<=h)&&"undefined"!==typeof m&&p.push(m);m>h&&(k=!0);m=g}}}else e=this.lin2log(e),h=this.lin2log(h),a=f?d.getMinorTickInterval():m.tickInterval,a=u("auto"===a?null:a,this.minorAutoInterval,m.tickPixelInterval/(f?5:1)*(h-e)/((f?l/d.tickPositions.length:l)||1)),a=G(a,void 0,C(a)),p=d.getLinearTickPositions(a,e,h).map(this.log2lin),f||(this.minorAutoInterval=a/5);f||(d.tickInterval=a);return p};a.prototype.lin2log=function(a){return Math.pow(10,a)};a.prototype.log2lin=function(a){return Math.log(a)/
|
||||
Math.LN10};return a}();a.Additions=m})(H||(H={}));return H});M(f,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[f["Core/Utilities.js"]],function(a){var f=a.erase,C=a.extend,G=a.isNumber,u;(function(a){var u=[],B;a.compose=function(a,f){B||(B=a);-1===u.indexOf(f)&&(u.push(f),C(f.prototype,z.prototype));return f};var z=function(){function a(){}a.prototype.getPlotBandPath=function(a,e,d){void 0===d&&(d=this.options);var f=this.getPlotLinePath({value:e,force:!0,acrossPanes:d.acrossPanes}),h=[],m=this.horiz;
|
||||
e=!G(this.min)||!G(this.max)||a<this.min&&e<this.min||a>this.max&&e>this.max;a=this.getPlotLinePath({value:a,force:!0,acrossPanes:d.acrossPanes});d=1;if(a&&f){if(e){var n=a.toString()===f.toString();d=0}for(e=0;e<a.length;e+=2){var p=a[e],w=a[e+1],y=f[e],A=f[e+1];"M"!==p[0]&&"L"!==p[0]||"M"!==w[0]&&"L"!==w[0]||"M"!==y[0]&&"L"!==y[0]||"M"!==A[0]&&"L"!==A[0]||(m&&y[1]===p[1]?(y[1]+=d,A[1]+=d):m||y[2]!==p[2]||(y[2]+=d,A[2]+=d),h.push(["M",p[1],p[2]],["L",w[1],w[2]],["L",A[1],A[2]],["L",y[1],y[2]],["Z"]));
|
||||
h.isFlat=n}}return h};a.prototype.addPlotBand=function(a){return this.addPlotBandOrLine(a,"plotBands")};a.prototype.addPlotLine=function(a){return this.addPlotBandOrLine(a,"plotLines")};a.prototype.addPlotBandOrLine=function(a,e){var d=this,f=this.userOptions,h=new B(this,a);this.visible&&(h=h.render());if(h){this._addedPlotLB||(this._addedPlotLB=!0,(f.plotLines||[]).concat(f.plotBands||[]).forEach(function(a){d.addPlotBandOrLine(a)}));if(e){var m=f[e]||[];m.push(a);f[e]=m}this.plotLinesAndBands.push(h)}return h};
|
||||
a.prototype.removePlotBandOrLine=function(a){var e=this.plotLinesAndBands,d=this.options,l=this.userOptions;if(e){for(var h=e.length;h--;)e[h].id===a&&e[h].destroy();[d.plotLines||[],l.plotLines||[],d.plotBands||[],l.plotBands||[]].forEach(function(d){for(h=d.length;h--;)(d[h]||{}).id===a&&f(d,d[h])})}};a.prototype.removePlotBand=function(a){this.removePlotBandOrLine(a)};a.prototype.removePlotLine=function(a){this.removePlotBandOrLine(a)};return a}()})(u||(u={}));return u});M(f,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",
|
||||
[f["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],f["Core/Utilities.js"]],function(a,f){var F=f.arrayMax,G=f.arrayMin,u=f.defined,H=f.destroyObjectProperties,I=f.erase,B=f.fireEvent,z=f.merge,p=f.objectEach,m=f.pick;f=function(){function e(a,e){this.axis=a;e&&(this.options=e,this.id=e.id)}e.compose=function(d){return a.compose(e,d)};e.prototype.render=function(){B(this,"render");var a=this,e=a.axis,f=e.horiz,t=e.logarithmic,n=a.options,v=n.color,w=m(n.zIndex,0),y=n.events,A={},q=e.chart.renderer,
|
||||
k=n.label,c=a.label,g=n.to,b=n.from,r=n.value,x=a.svgElem,D=[],K=u(b)&&u(g);D=u(r);var P=!x,Q={"class":"highcharts-plot-"+(K?"band ":"line ")+(n.className||"")},O=K?"bands":"lines";t&&(b=t.log2lin(b),g=t.log2lin(g),r=t.log2lin(r));e.chart.styledMode||(D?(Q.stroke=v||"#999999",Q["stroke-width"]=m(n.width,1),n.dashStyle&&(Q.dashstyle=n.dashStyle)):K&&(Q.fill=v||"#e6ebf5",n.borderWidth&&(Q.stroke=n.borderColor,Q["stroke-width"]=n.borderWidth)));A.zIndex=w;O+="-"+w;(t=e.plotLinesAndBandsGroups[O])||(e.plotLinesAndBandsGroups[O]=
|
||||
t=q.g("plot-"+O).attr(A).add());P&&(a.svgElem=x=q.path().attr(Q).add(t));if(D)D=e.getPlotLinePath({value:r,lineWidth:x.strokeWidth(),acrossPanes:n.acrossPanes});else if(K)D=e.getPlotBandPath(b,g,n);else return;!a.eventsAdded&&y&&(p(y,function(b,c){x.on(c,function(b){y[c].apply(a,[b])})}),a.eventsAdded=!0);(P||!x.d)&&D&&D.length?x.attr({d:D}):x&&(D?(x.show(!0),x.animate({d:D})):x.d&&(x.hide(),c&&(a.label=c=c.destroy())));k&&(u(k.text)||u(k.formatter))&&D&&D.length&&0<e.width&&0<e.height&&!D.isFlat?
|
||||
(k=z({align:f&&K&&"center",x:f?!K&&4:10,verticalAlign:!f&&K&&"middle",y:f?K?16:10:K?6:-4,rotation:f&&!K&&90},k),this.renderLabel(k,D,K,w)):c&&c.hide();return a};e.prototype.renderLabel=function(a,e,f,m){var d=this.axis,h=d.chart.renderer,l=this.label;l||(this.label=l=h.text(this.getLabelText(a),0,0,a.useHTML).attr({align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(f?"band":"line")+"-label "+(a.className||""),zIndex:m}).add(),d.chart.styledMode||l.css(z({textOverflow:"ellipsis"},
|
||||
a.style)));m=e.xBounds||[e[0][1],e[1][1],f?e[2][1]:e[0][1]];e=e.yBounds||[e[0][2],e[1][2],f?e[2][2]:e[0][2]];f=G(m);h=G(e);l.align(a,!1,{x:f,y:h,width:F(m)-f,height:F(e)-h});l.alignValue&&"left"!==l.alignValue||l.css({width:(90===l.rotation?d.height-(l.alignAttr.y-d.top):d.width-(l.alignAttr.x-d.left))+"px"});l.show(!0)};e.prototype.getLabelText=function(a){return u(a.formatter)?a.formatter.call(this):a.text};e.prototype.destroy=function(){I(this.axis.plotLinesAndBands,this);delete this.axis;H(this)};
|
||||
return e}();"";"";return f});M(f,"Core/Tooltip.js",[f["Core/FormatUtilities.js"],f["Core/Globals.js"],f["Core/Renderer/RendererUtilities.js"],f["Core/Renderer/RendererRegistry.js"],f["Core/Utilities.js"]],function(a,f,C,G,u){var F=a.format,I=f.doc,B=C.distribute,z=u.addEvent,p=u.clamp,m=u.css,e=u.defined,d=u.discardElement,l=u.extend,h=u.fireEvent,t=u.isArray,n=u.isNumber,v=u.isString,w=u.merge,y=u.pick,A=u.splat,q=u.syncTimeout;a=function(){function a(c,a){this.allowShared=!0;this.container=void 0;
|
||||
this.crosshairs=[];this.distance=0;this.isHidden=!0;this.isSticky=!1;this.now={};this.options={};this.outside=!1;this.chart=c;this.init(c,a)}a.prototype.applyFilter=function(){var c=this.chart;c.renderer.definition({tagName:"filter",attributes:{id:"drop-shadow-"+c.index,opacity:.5},children:[{tagName:"feGaussianBlur",attributes:{"in":"SourceAlpha",stdDeviation:1}},{tagName:"feOffset",attributes:{dx:1,dy:1}},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",attributes:{type:"linear",slope:.3}}]},
|
||||
{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",attributes:{"in":"SourceGraphic"}}]}]})};a.prototype.bodyFormatter=function(c){return c.map(function(c){var b=c.series.tooltipOptions;return(b[(c.point.formatPrefix||"point")+"Formatter"]||c.point.tooltipFormatter).call(c.point,b[(c.point.formatPrefix||"point")+"Format"]||"")})};a.prototype.cleanSplit=function(c){this.chart.series.forEach(function(a){var b=a&&a.tt;b&&(!b.isActive||c?a.tt=b.destroy():b.isActive=!1)})};a.prototype.defaultFormatter=
|
||||
function(c){var a=this.points||A(this);var b=[c.tooltipFooterHeaderFormatter(a[0])];b=b.concat(c.bodyFormatter(a));b.push(c.tooltipFooterHeaderFormatter(a[0],!0));return b};a.prototype.destroy=function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(!0),this.tt=this.tt.destroy());this.renderer&&(this.renderer=this.renderer.destroy(),d(this.container));u.clearTimeout(this.hideTimer);u.clearTimeout(this.tooltipTimeout)};a.prototype.getAnchor=function(c,a){var b=
|
||||
this.chart,d=b.pointer,g=b.inverted,e=b.plotTop,k=b.plotLeft,f,h,q=0,l=0;c=A(c);this.followPointer&&a?("undefined"===typeof a.chartX&&(a=d.normalize(a)),d=[a.chartX-k,a.chartY-e]):c[0].tooltipPos?d=c[0].tooltipPos:(c.forEach(function(c){f=c.series.yAxis;h=c.series.xAxis;q+=c.plotX||0;l+=c.plotLow?(c.plotLow+(c.plotHigh||0))/2:c.plotY||0;h&&f&&(g?(q+=e+b.plotHeight-h.len-h.pos,l+=k+b.plotWidth-f.len-f.pos):(q+=h.pos-k,l+=f.pos-e))}),q/=c.length,l/=c.length,d=[g?b.plotWidth-l:q,g?b.plotHeight-q:l],
|
||||
this.shared&&1<c.length&&a&&(g?d[0]=a.chartX-k:d[1]=a.chartY-e));return d.map(Math.round)};a.prototype.getLabel=function(){var c=this,a=this.chart.styledMode,b=this.options,d=this.split&&this.allowShared,k="tooltip"+(e(b.className)?" "+b.className:""),h=b.style.pointerEvents||(!this.followPointer&&b.stickOnContact?"auto":"none"),q=function(){c.inContact=!0},l=function(b){var a=c.chart.hoverSeries;c.inContact=c.shouldStickOnContact()&&c.chart.pointer.inClass(b.relatedTarget,"highcharts-tooltip");if(!c.inContact&&
|
||||
a&&a.onMouseOut)a.onMouseOut()},n,p=this.chart.renderer;if(c.label){var t=!c.label.hasClass("highcharts-label");(d&&!t||!d&&t)&&c.destroy()}if(!this.label){if(this.outside){t=this.chart.options.chart.style;var A=G.getRendererType();this.container=n=f.doc.createElement("div");n.className="highcharts-tooltip-container";m(n,{position:"absolute",top:"1px",pointerEvents:h,zIndex:Math.max(this.options.style.zIndex||0,(t&&t.zIndex||0)+3)});z(n,"mouseenter",q);z(n,"mouseleave",l);f.doc.body.appendChild(n);
|
||||
this.renderer=p=new A(n,0,0,t,void 0,void 0,p.styledMode)}d?this.label=p.g(k):(this.label=p.label("",0,0,b.shape,void 0,void 0,b.useHTML,void 0,k).attr({padding:b.padding,r:b.borderRadius}),a||this.label.attr({fill:b.backgroundColor,"stroke-width":b.borderWidth}).css(b.style).css({pointerEvents:h}).shadow(b.shadow));a&&b.shadow&&(this.applyFilter(),this.label.attr({filter:"url(#drop-shadow-"+this.chart.index+")"}));if(c.outside&&!c.split){var w=this.label,y=w.xSetter,v=w.ySetter;w.xSetter=function(b){y.call(w,
|
||||
c.distance);n.style.left=b+"px"};w.ySetter=function(b){v.call(w,c.distance);n.style.top=b+"px"}}this.label.on("mouseenter",q).on("mouseleave",l).attr({zIndex:8}).add()}return this.label};a.prototype.getPosition=function(c,a,b){var d=this.chart,g=this.distance,e={},k=d.inverted&&b.h||0,f=this.outside,h=f?I.documentElement.clientWidth-2*g:d.chartWidth,q=f?Math.max(I.body.scrollHeight,I.documentElement.scrollHeight,I.body.offsetHeight,I.documentElement.offsetHeight,I.documentElement.clientHeight):d.chartHeight,
|
||||
l=d.pointer.getChartPosition(),m=function(e){var k="x"===e;return[e,k?h:q,k?c:a].concat(f?[k?c*l.scaleX:a*l.scaleY,k?l.left-g+(b.plotX+d.plotLeft)*l.scaleX:l.top-g+(b.plotY+d.plotTop)*l.scaleY,0,k?h:q]:[k?c:a,k?b.plotX+d.plotLeft:b.plotY+d.plotTop,k?d.plotLeft:d.plotTop,k?d.plotLeft+d.plotWidth:d.plotTop+d.plotHeight])},n=m("y"),p=m("x"),t;m=!!b.negative;!d.polar&&d.hoverSeries&&d.hoverSeries.yAxis&&d.hoverSeries.yAxis.reversed&&(m=!m);var A=!this.followPointer&&y(b.ttBelow,!d.inverted===m),w=function(b,
|
||||
c,a,d,r,h,q){var x=f?"y"===b?g*l.scaleY:g*l.scaleX:g,m=(a-d)/2,E=d<r-g,n=r+g+d<c,D=r-x-a+m;r=r+x-m;if(A&&n)e[b]=r;else if(!A&&E)e[b]=D;else if(E)e[b]=Math.min(q-d,0>D-k?D:D-k);else if(n)e[b]=Math.max(h,r+k+a>c?r:r+k);else return!1},v=function(b,c,a,d,k){var r;k<g||k>c-g?r=!1:e[b]=k<a/2?1:k>c-d/2?c-d-2:k-a/2;return r},E=function(b){var c=n;n=p;p=c;t=b},T=function(){!1!==w.apply(0,n)?!1!==v.apply(0,p)||t||(E(!0),T()):t?e.x=e.y=0:(E(!0),T())};(d.inverted||1<this.len)&&E();T();return e};a.prototype.hide=
|
||||
function(c){var a=this;u.clearTimeout(this.hideTimer);c=y(c,this.options.hideDelay);this.isHidden||(this.hideTimer=q(function(){a.getLabel().fadeOut(c?void 0:c);a.isHidden=!0},c))};a.prototype.init=function(c,a){this.chart=c;this.options=a;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=a.split&&!c.inverted&&!c.polar;this.shared=a.shared||this.split;this.outside=y(a.outside,!(!c.scrollablePixelsX&&!c.scrollablePixelsY))};a.prototype.shouldStickOnContact=function(){return!(this.followPointer||
|
||||
!this.options.stickOnContact)};a.prototype.isStickyOnContact=function(){return!(!this.shouldStickOnContact()||!this.inContact)};a.prototype.move=function(c,a,b,d){var g=this,e=g.now,k=!1!==g.options.animation&&!g.isHidden&&(1<Math.abs(c-e.x)||1<Math.abs(a-e.y)),r=g.followPointer||1<g.len;l(e,{x:k?(2*e.x+c)/3:c,y:k?(e.y+a)/2:a,anchorX:r?void 0:k?(2*e.anchorX+b)/3:b,anchorY:r?void 0:k?(e.anchorY+d)/2:d});g.getLabel().attr(e);g.drawTracker();k&&(u.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=
|
||||
setTimeout(function(){g&&g.move(c,a,b,d)},32))};a.prototype.refresh=function(c,a){var b=this.chart,d=this.options,g=A(c),e=g[0],k=[],f=d.formatter||this.defaultFormatter,q=this.shared,l=b.styledMode,m={};if(d.enabled&&e.series){u.clearTimeout(this.hideTimer);this.allowShared=!(!t(c)&&c.series&&c.series.noSharedTooltip);this.followPointer=!this.split&&e.series.tooltipOptions.followPointer;c=this.getAnchor(c,a);var n=c[0],p=c[1];q&&this.allowShared?(b.pointer.applyInactiveState(g),g.forEach(function(b){b.setState("hover");
|
||||
k.push(b.getLabelConfig())}),m={x:e.category,y:e.y},m.points=k):m=e.getLabelConfig();this.len=k.length;f=f.call(m,this);q=e.series;this.distance=y(q.tooltipOptions.distance,16);if(!1===f)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(f,g);else{var w=n,v=p;a&&b.pointer.isDirectTouch&&(w=a.chartX-b.plotLeft,v=a.chartY-b.plotTop);if(b.polar||!1===q.options.clip||g.some(function(b){return b.series.shouldShowTooltip(w,v)}))a=this.getLabel(),d.style.width&&!l||a.css({width:this.chart.spacingBox.width+
|
||||
"px"}),a.attr({text:f&&f.join?f.join(""):f}),a.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+y(e.colorIndex,q.colorIndex)),l||a.attr({stroke:d.borderColor||e.color||q.color||"#666666"}),this.updatePosition({plotX:n,plotY:p,negative:e.negative,ttBelow:e.ttBelow,h:c[2]||0});else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show();this.isHidden=!1}h(this,"refresh")}};a.prototype.renderSplit=function(c,a){function b(b,c,a,g,e){void 0===e&&(e=!0);a?
|
||||
(c=X?0:H,b=p(b-g/2,N.left,N.right-g-(d.outside?S:0))):(c-=C,b=e?b-g-F:b+F,b=p(b,e?b:N.left,N.right));return{x:b,y:c}}var d=this,g=d.chart,e=d.chart,k=e.chartWidth,f=e.chartHeight,h=e.plotHeight,q=e.plotLeft,m=e.plotTop,n=e.pointer,t=e.scrollablePixelsY;t=void 0===t?0:t;var A=e.scrollablePixelsX,w=e.scrollingContainer;w=void 0===w?{scrollLeft:0,scrollTop:0}:w;var z=w.scrollLeft;w=w.scrollTop;var u=e.styledMode,F=d.distance,E=d.options,T=d.options.positioner,N=d.outside&&"number"!==typeof A?I.documentElement.getBoundingClientRect():
|
||||
{left:z,right:z+k,top:w,bottom:w+f},U=d.getLabel(),V=this.renderer||g.renderer,X=!(!g.xAxis[0]||!g.xAxis[0].opposite);g=n.getChartPosition();var S=g.left;g=g.top;var C=m+w,aa=0,H=h-t;v(c)&&(c=[!1,c]);c=c.slice(0,a.length+1).reduce(function(c,g,e){if(!1!==g&&""!==g){e=a[e-1]||{isHeader:!0,plotX:a[0].plotX,plotY:h,series:{}};var k=e.isHeader,f=k?d:e.series;g=g.toString();var r=f.tt,l=e.isHeader;var x=e.series;var n="highcharts-color-"+y(e.colorIndex,x.colorIndex,"none");r||(r={padding:E.padding,r:E.borderRadius},
|
||||
u||(r.fill=E.backgroundColor,r["stroke-width"]=E.borderWidth),r=V.label("",0,0,E[l?"headerShape":"shape"],void 0,void 0,E.useHTML).addClass((l?"highcharts-tooltip-header ":"")+"highcharts-tooltip-box "+n).attr(r).add(U));r.isActive=!0;r.attr({text:g});u||r.css(E.style).shadow(E.shadow).attr({stroke:E.borderColor||e.color||x.color||"#333333"});f=f.tt=r;l=f.getBBox();g=l.width+f.strokeWidth();k&&(aa=l.height,H+=aa,X&&(C-=aa));x=e.plotX;x=void 0===x?0:x;n=e.plotY;n=void 0===n?0:n;r=e.series;if(e.isHeader){x=
|
||||
q+x;var D=m+h/2}else{var t=r.xAxis,A=r.yAxis;x=t.pos+p(x,-F,t.len+F);r.shouldShowTooltip(0,A.pos-m+n,{ignoreX:!0})&&(D=A.pos+n)}x=p(x,N.left-F,N.right+F);"number"===typeof D?(l=l.height+1,n=T?T.call(d,g,l,e):b(x,D,k,g),c.push({align:T?0:void 0,anchorX:x,anchorY:D,boxWidth:g,point:e,rank:y(n.rank,k?1:0),size:l,target:n.y,tt:f,x:n.x})):f.isActive=!1}return c},[]);!T&&c.some(function(b){var c=(d.outside?S:0)+b.anchorX;return c<N.left&&c+b.boxWidth<N.right?!0:c<S-N.left+b.boxWidth&&N.right-c>c})&&(c=
|
||||
c.map(function(c){var a=b(c.anchorX,c.anchorY,c.point.isHeader,c.boxWidth,!1);return l(c,{target:a.y,x:a.x})}));d.cleanSplit();B(c,H);var G=S,ba=S;c.forEach(function(b){var c=b.x,a=b.boxWidth;b=b.isHeader;b||(d.outside&&S+c<G&&(G=S+c),!b&&d.outside&&G+a>ba&&(ba=S+c))});c.forEach(function(b){var c=b.x,a=b.anchorX,g=b.pos,e=b.point.isHeader;g={visibility:"undefined"===typeof g?"hidden":"inherit",x:c,y:g+C,anchorX:a,anchorY:b.anchorY};if(d.outside&&c<a){var k=S-G;0<k&&(e||(g.x=c+k,g.anchorX=a+k),e&&
|
||||
(g.x=(ba-G)/2,g.anchorX=a+k))}b.tt.attr(g)});c=d.container;t=d.renderer;d.outside&&c&&t&&(e=U.getBBox(),t.setSize(e.width+e.x,e.height+e.y,!1),c.style.left=G+"px",c.style.top=g+"px")};a.prototype.drawTracker=function(){if(this.followPointer||!this.options.stickOnContact)this.tracker&&this.tracker.destroy();else{var c=this.chart,a=this.label,b=this.shared?c.hoverPoints:c.hoverPoint;if(a&&b){var d={x:0,y:0,width:0,height:0};b=this.getAnchor(b);var e=a.getBBox();b[0]+=c.plotLeft-a.translateX;b[1]+=c.plotTop-
|
||||
a.translateY;d.x=Math.min(0,b[0]);d.y=Math.min(0,b[1]);d.width=0>b[0]?Math.max(Math.abs(b[0]),e.width-b[0]):Math.max(Math.abs(b[0]),e.width);d.height=0>b[1]?Math.max(Math.abs(b[1]),e.height-Math.abs(b[1])):Math.max(Math.abs(b[1]),e.height);this.tracker?this.tracker.attr(d):(this.tracker=a.renderer.rect(d).addClass("highcharts-tracker").add(a),c.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}};a.prototype.styledModeFormat=function(c){return c.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,
|
||||
'class="highcharts-color-{$1.colorIndex}"')};a.prototype.tooltipFooterHeaderFormatter=function(c,a){var b=c.series,d=b.tooltipOptions,g=b.xAxis,e=g&&g.dateTime;g={isFooter:a,labelConfig:c};var k=d.xDateFormat,f=d[a?"footerFormat":"headerFormat"];h(this,"headerFormatter",g,function(a){e&&!k&&n(c.key)&&(k=e.getXDateFormat(c.key,d.dateTimeLabelFormats));e&&k&&(c.point&&c.point.tooltipDateKeys||["key"]).forEach(function(b){f=f.replace("{point."+b+"}","{point."+b+":"+k+"}")});b.chart.styledMode&&(f=this.styledModeFormat(f));
|
||||
a.text=F(f,{point:c,series:b},this.chart)});return g.text};a.prototype.update=function(c){this.destroy();w(!0,this.chart.options.tooltip.userOptions,c);this.init(this.chart,w(!0,this.options,c))};a.prototype.updatePosition=function(c){var a=this.chart,b=this.options,d=a.pointer,e=this.getLabel();d=d.getChartPosition();var k=(b.positioner||this.getPosition).call(this,e.width,e.height,c),f=c.plotX+a.plotLeft;c=c.plotY+a.plotTop;if(this.outside){b=b.borderWidth+2*this.distance;this.renderer.setSize(e.width+
|
||||
b,e.height+b,!1);if(1!==d.scaleX||1!==d.scaleY)m(this.container,{transform:"scale("+d.scaleX+", "+d.scaleY+")"}),f*=d.scaleX,c*=d.scaleY;f+=d.left-k.x;c+=d.top-k.y}this.move(Math.round(k.x),Math.round(k.y||0),f,c)};return a}();"";return a});M(f,"Core/Series/Point.js",[f["Core/Renderer/HTML/AST.js"],f["Core/Animation/AnimationUtilities.js"],f["Core/DefaultOptions.js"],f["Core/FormatUtilities.js"],f["Core/Utilities.js"]],function(a,f,C,G,u){var F=f.animObject,I=C.defaultOptions,B=G.format,z=u.addEvent,
|
||||
p=u.defined,m=u.erase,e=u.extend,d=u.fireEvent,l=u.getNestedProperty,h=u.isArray,t=u.isFunction,n=u.isNumber,v=u.isObject,w=u.merge,y=u.objectEach,A=u.pick,q=u.syncTimeout,k=u.removeEvent,c=u.uniqueKey;f=function(){function g(){this.colorIndex=this.category=void 0;this.formatPrefix="point";this.id=void 0;this.isNull=!1;this.percentage=this.options=this.name=void 0;this.selected=!1;this.total=this.series=void 0;this.visible=!0;this.x=void 0}g.prototype.animateBeforeDestroy=function(){var b=this,c=
|
||||
{x:b.startXPos,opacity:0},a=b.getGraphicalProps();a.singular.forEach(function(a){b[a]=b[a].animate("dataLabel"===a?{x:b[a].startXPos,y:b[a].startYPos,opacity:0}:c)});a.plural.forEach(function(c){b[c].forEach(function(c){c.element&&c.animate(e({x:b.startXPos},c.startYPos?{x:c.startXPos,y:c.startYPos}:{}))})})};g.prototype.applyOptions=function(b,c){var a=this.series,d=a.options.pointValKey||a.pointValKey;b=g.prototype.optionsToObject.call(this,b);e(this,b);this.options=this.options?e(this.options,
|
||||
b):b;b.group&&delete this.group;b.dataLabels&&delete this.dataLabels;d&&(this.y=g.prototype.getNestedProperty.call(this,d));this.formatPrefix=(this.isNull=A(this.isValid&&!this.isValid(),null===this.x||!n(this.y)))?"null":"point";this.selected&&(this.state="select");"name"in this&&"undefined"===typeof c&&a.xAxis&&a.xAxis.hasNames&&(this.x=a.xAxis.nameToX(this));"undefined"===typeof this.x&&a?this.x="undefined"===typeof c?a.autoIncrement():c:n(b.x)&&a.options.relativeXValue&&(this.x=a.autoIncrement(b.x));
|
||||
return this};g.prototype.destroy=function(){function b(){if(c.graphic||c.dataLabel||c.dataLabels)k(c),c.destroyElements();for(f in c)c[f]=null}var c=this,a=c.series,d=a.chart;a=a.options.dataSorting;var g=d.hoverPoints,e=F(c.series.chart.renderer.globalAnimation),f;c.legendItem&&d.legend.destroyItem(c);g&&(c.setState(),m(g,c),g.length||(d.hoverPoints=null));if(c===d.hoverPoint)c.onMouseOut();a&&a.enabled?(this.animateBeforeDestroy(),q(b,e.duration)):b();d.pointCount--};g.prototype.destroyElements=
|
||||
function(b){var c=this;b=c.getGraphicalProps(b);b.singular.forEach(function(b){c[b]=c[b].destroy()});b.plural.forEach(function(b){c[b].forEach(function(b){b.element&&b.destroy()});delete c[b]})};g.prototype.firePointEvent=function(b,c,a){var g=this,e=this.series.options;(e.point.events[b]||g.options&&g.options.events&&g.options.events[b])&&g.importEvents();"click"===b&&e.allowPointSelect&&(a=function(b){g.select&&g.select(null,b.ctrlKey||b.metaKey||b.shiftKey)});d(g,b,c,a)};g.prototype.getClassName=
|
||||
function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+("undefined"!==typeof this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")};g.prototype.getGraphicalProps=function(b){var c=this,a=[],d={singular:[],plural:[]},g;b=b||{graphic:1,dataLabel:1};
|
||||
b.graphic&&a.push("graphic","upperGraphic","shadowGroup");b.dataLabel&&a.push("dataLabel","dataLabelUpper","connector");for(g=a.length;g--;){var e=a[g];c[e]&&d.singular.push(e)}["dataLabel","connector"].forEach(function(a){var g=a+"s";b[a]&&c[g]&&d.plural.push(g)});return d};g.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}};
|
||||
g.prototype.getNestedProperty=function(b){if(b)return 0===b.indexOf("custom.")?l(b,this.options):this[b]};g.prototype.getZone=function(){var b=this.series,c=b.zones;b=b.zoneAxis||"y";var a,d=0;for(a=c[d];this[b]>=a.value;)a=c[++d];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=a&&a.color&&!this.options.color?a.color:this.nonZonedColor;return a};g.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType};g.prototype.init=
|
||||
function(b,a,g){this.series=b;this.applyOptions(a,g);this.id=p(this.id)?this.id:c();this.resolveColor();b.chart.pointCount++;d(this,"afterInit");return this};g.prototype.optionsToObject=function(b){var c=this.series,a=c.options.keys,d=a||c.pointArrayMap||["y"],e=d.length,k={},f=0,q=0;if(n(b)||null===b)k[d[0]]=b;else if(h(b))for(!a&&b.length>e&&(c=typeof b[0],"string"===c?k.name=b[0]:"number"===c&&(k.x=b[0]),f++);q<e;)a&&"undefined"===typeof b[f]||(0<d[q].indexOf(".")?g.prototype.setNestedProperty(k,
|
||||
b[f],d[q]):k[d[q]]=b[f]),f++,q++;else"object"===typeof b&&(k=b,b.dataLabels&&(c._hasPointLabels=!0),b.marker&&(c._hasPointMarkers=!0));return k};g.prototype.resolveColor=function(){var b=this.series,c=b.chart.styledMode;var a=b.chart.options.chart.colorCount;delete this.nonZonedColor;if(b.options.colorByPoint){if(!c){a=b.options.colors||b.chart.options.colors;var d=a[b.colorCounter];a=a.length}c=b.colorCounter;b.colorCounter++;b.colorCounter===a&&(b.colorCounter=0)}else c||(d=b.color),c=b.colorIndex;
|
||||
this.colorIndex=A(this.options.colorIndex,c);this.color=A(this.options.color,d)};g.prototype.setNestedProperty=function(b,c,a){a.split(".").reduce(function(b,a,d,g){b[a]=g.length-1===d?c:v(b[a],!0)?b[a]:{};return b[a]},b);return b};g.prototype.tooltipFormatter=function(b){var c=this.series,a=c.tooltipOptions,d=A(a.valueDecimals,""),g=a.valuePrefix||"",e=a.valueSuffix||"";c.chart.styledMode&&(b=c.chart.tooltip.styledModeFormat(b));(c.pointArrayMap||["y"]).forEach(function(c){c="{point."+c;if(g||e)b=
|
||||
b.replace(RegExp(c+"}","g"),g+c+"}"+e);b=b.replace(RegExp(c+"}","g"),c+":,."+d+"f}")});return B(b,{point:this,series:this.series},c.chart)};g.prototype.update=function(b,c,a,d){function g(){e.applyOptions(b);var d=f&&e.hasDummyGraphic;d=null===e.y?!d:d;f&&d&&(e.graphic=f.destroy(),delete e.hasDummyGraphic);v(b,!0)&&(f&&f.element&&b&&b.marker&&"undefined"!==typeof b.marker.symbol&&(e.graphic=f.destroy()),b&&b.dataLabels&&e.dataLabel&&(e.dataLabel=e.dataLabel.destroy()),e.connector&&(e.connector=e.connector.destroy()));
|
||||
r=e.index;k.updateParallelArrays(e,r);q.data[r]=v(q.data[r],!0)||v(b,!0)?e.options:A(b,q.data[r]);k.isDirty=k.isDirtyData=!0;!k.fixedBox&&k.hasCartesianSeries&&(h.isDirtyBox=!0);"point"===q.legendType&&(h.isDirtyLegend=!0);c&&h.redraw(a)}var e=this,k=e.series,f=e.graphic,h=k.chart,q=k.options,r;c=A(c,!0);!1===d?g():e.firePointEvent("update",{options:b},g)};g.prototype.remove=function(b,c){this.series.removePoint(this.series.data.indexOf(this),b,c)};g.prototype.select=function(b,c){var a=this,d=a.series,
|
||||
g=d.chart;this.selectedStaging=b=A(b,!a.selected);a.firePointEvent(b?"select":"unselect",{accumulate:c},function(){a.selected=a.options.selected=b;d.options.data[d.data.indexOf(a)]=a.options;a.setState(b&&"select");c||g.getSelectedPoints().forEach(function(b){var c=b.series;b.selected&&b!==a&&(b.selected=b.options.selected=!1,c.options.data[c.data.indexOf(b)]=b.options,b.setState(g.hoverPoints&&c.options.inactiveOtherPoints?"inactive":""),b.firePointEvent("unselect"))})});delete this.selectedStaging};
|
||||
g.prototype.onMouseOver=function(b){var c=this.series.chart,a=c.pointer;b=b?a.normalize(b):a.getChartCoordinatesFromPoint(this,c.inverted);a.runPointActions(b,this)};g.prototype.onMouseOut=function(){var b=this.series.chart;this.firePointEvent("mouseOut");this.series.options.inactiveOtherPoints||(b.hoverPoints||[]).forEach(function(b){b.setState()});b.hoverPoints=b.hoverPoint=null};g.prototype.importEvents=function(){if(!this.hasImportedEvents){var b=this,c=w(b.series.options.point,b.options).events;
|
||||
b.events=c;y(c,function(c,a){t(c)&&z(b,a,c)});this.hasImportedEvents=!0}};g.prototype.setState=function(b,c){var g=this.series,k=this.state,f=g.options.states[b||"normal"]||{},h=I.plotOptions[g.type].marker&&g.options.marker,q=h&&!1===h.enabled,r=h&&h.states&&h.states[b||"normal"]||{},l=!1===r.enabled,m=this.marker||{},p=g.chart,t=h&&g.markerAttribs,w=g.halo,y,v=g.stateMarkerGraphic;b=b||"";if(!(b===this.state&&!c||this.selected&&"select"!==b||!1===f.enabled||b&&(l||q&&!1===r.enabled)||b&&m.states&&
|
||||
m.states[b]&&!1===m.states[b].enabled)){this.state=b;t&&(y=g.markerAttribs(this,b));if(this.graphic&&!this.hasDummyGraphic){k&&this.graphic.removeClass("highcharts-point-"+k);b&&this.graphic.addClass("highcharts-point-"+b);if(!p.styledMode){var z=g.pointAttribs(this,b);var E=A(p.options.chart.animation,f.animation);g.options.inactiveOtherPoints&&n(z.opacity)&&((this.dataLabels||[]).forEach(function(b){b&&b.animate({opacity:z.opacity},E)}),this.connector&&this.connector.animate({opacity:z.opacity},
|
||||
E));this.graphic.animate(z,E)}y&&this.graphic.animate(y,A(p.options.chart.animation,r.animation,h.animation));v&&v.hide()}else{if(b&&r){k=m.symbol||g.symbol;v&&v.currentSymbol!==k&&(v=v.destroy());if(y)if(v)v[c?"animate":"attr"]({x:y.x,y:y.y});else k&&(g.stateMarkerGraphic=v=p.renderer.symbol(k,y.x,y.y,y.width,y.height).add(g.markerGroup),v.currentSymbol=k);!p.styledMode&&v&&"inactive"!==this.state&&v.attr(g.pointAttribs(this,b))}v&&(v[b&&this.isInside?"show":"hide"](),v.element.point=this,v.addClass(this.getClassName(),
|
||||
!0))}f=f.halo;y=(v=this.graphic||v)&&v.visibility||"inherit";f&&f.size&&v&&"hidden"!==y&&!this.isCluster?(w||(g.halo=w=p.renderer.path().add(v.parentGroup)),w.show()[c?"animate":"attr"]({d:this.haloPath(f.size)}),w.attr({"class":"highcharts-halo highcharts-color-"+A(this.colorIndex,g.colorIndex)+(this.className?" "+this.className:""),visibility:y,zIndex:-1}),w.point=this,p.styledMode||w.attr(e({fill:this.color||g.color,"fill-opacity":f.opacity},a.filterUserAttributes(f.attributes||{})))):w&&w.point&&
|
||||
w.point.haloPath&&w.animate({d:w.point.haloPath(0)},null,w.hide);d(this,"afterSetState",{state:b})}};g.prototype.haloPath=function(b){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-b,this.plotY-b,2*b,2*b)};return g}();"";return f});M(f,"Core/Pointer.js",[f["Core/Color/Color.js"],f["Core/Globals.js"],f["Core/Tooltip.js"],f["Core/Utilities.js"]],function(a,f,C,G){var u=a.parse,F=f.charts,I=f.noop,B=G.addEvent,z=G.attr,p=G.css,m=G.defined,e=G.extend,d=G.find,l=G.fireEvent,h=
|
||||
G.isNumber,t=G.isObject,n=G.objectEach,v=G.offset,w=G.pick,y=G.splat;a=function(){function a(a,d){this.lastValidTouch={};this.pinchDown=[];this.runChartClick=!1;this.eventsToUnbind=[];this.chart=a;this.hasDragged=!1;this.options=d;this.init(a,d)}a.prototype.applyInactiveState=function(a){var d=[],c;(a||[]).forEach(function(a){c=a.series;d.push(c);c.linkedParent&&d.push(c.linkedParent);c.linkedSeries&&(d=d.concat(c.linkedSeries));c.navigatorSeries&&d.push(c.navigatorSeries)});this.chart.series.forEach(function(c){-1===
|
||||
d.indexOf(c)?c.setState("inactive",!0):c.options.inactiveOtherPoints&&c.setAllPointsToState("inactive")})};a.prototype.destroy=function(){var d=this;this.eventsToUnbind.forEach(function(a){return a()});this.eventsToUnbind=[];f.chartCount||(a.unbindDocumentMouseUp&&(a.unbindDocumentMouseUp=a.unbindDocumentMouseUp()),a.unbindDocumentTouchEnd&&(a.unbindDocumentTouchEnd=a.unbindDocumentTouchEnd()));clearInterval(d.tooltipTimeout);n(d,function(a,c){d[c]=void 0})};a.prototype.drag=function(a){var d=this.chart,
|
||||
c=d.options.chart,g=this.zoomHor,b=this.zoomVert,e=d.plotLeft,f=d.plotTop,h=d.plotWidth,q=d.plotHeight,l=this.mouseDownX||0,m=this.mouseDownY||0,n=t(c.panning)?c.panning&&c.panning.enabled:c.panning,p=c.panKey&&a[c.panKey+"Key"],w=a.chartX,y=a.chartY,v=this.selectionMarker;if(!v||!v.touch)if(w<e?w=e:w>e+h&&(w=e+h),y<f?y=f:y>f+q&&(y=f+q),this.hasDragged=Math.sqrt(Math.pow(l-w,2)+Math.pow(m-y,2)),10<this.hasDragged){var A=d.isInsidePlot(l-e,m-f,{visiblePlotOnly:!0});!d.hasCartesianSeries&&!d.mapView||
|
||||
!this.zoomX&&!this.zoomY||!A||p||v||(this.selectionMarker=v=d.renderer.rect(e,f,g?1:h,b?1:q,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add(),d.styledMode||v.attr({fill:c.selectionMarkerFill||u("#335cad").setOpacity(.25).get()}));v&&g&&(g=w-l,v.attr({width:Math.abs(g),x:(0<g?0:g)+l}));v&&b&&(g=y-m,v.attr({height:Math.abs(g),y:(0<g?0:g)+m}));A&&!v&&n&&d.pan(a,c.panning)}};a.prototype.dragStart=function(a){var d=this.chart;d.mouseIsDown=a.type;d.cancelClick=!1;d.mouseDownX=this.mouseDownX=
|
||||
a.chartX;d.mouseDownY=this.mouseDownY=a.chartY};a.prototype.drop=function(a){var d=this,c=this.chart,g=this.hasPinched;if(this.selectionMarker){var b=this.selectionMarker,f=b.attr?b.attr("x"):b.x,q=b.attr?b.attr("y"):b.y,n=b.attr?b.attr("width"):b.width,t=b.attr?b.attr("height"):b.height,w={originalEvent:a,xAxis:[],yAxis:[],x:f,y:q,width:n,height:t},y=!!c.mapView;if(this.hasDragged||g)c.axes.forEach(function(b){if(b.zoomEnabled&&m(b.min)&&(g||d[{xAxis:"zoomX",yAxis:"zoomY"}[b.coll]])&&h(f)&&h(q)){var c=
|
||||
b.horiz,e="touchend"===a.type?b.minPixelPadding:0,k=b.toValue((c?f:q)+e);c=b.toValue((c?f+n:q+t)-e);w[b.coll].push({axis:b,min:Math.min(k,c),max:Math.max(k,c)});y=!0}}),y&&l(c,"selection",w,function(b){c.zoom(e(b,g?{animation:!1}:null))});h(c.index)&&(this.selectionMarker=this.selectionMarker.destroy());g&&this.scaleGroups()}c&&h(c.index)&&(p(c.container,{cursor:c._cursor}),c.cancelClick=10<this.hasDragged,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])};a.prototype.findNearestKDPoint=
|
||||
function(a,d,c){var g=this.chart,b=g.hoverPoint;g=g.tooltip;if(b&&g&&g.isStickyOnContact())return b;var e;a.forEach(function(b){var a=!(b.noSharedTooltip&&d)&&0>b.options.findNearestPointBy.indexOf("y");b=b.searchPoint(c,a);if((a=t(b,!0)&&b.series)&&!(a=!t(e,!0))){a=e.distX-b.distX;var g=e.dist-b.dist,k=(b.series.group&&b.series.group.zIndex)-(e.series.group&&e.series.group.zIndex);a=0<(0!==a&&d?a:0!==g?g:0!==k?k:e.series.index>b.series.index?-1:1)}a&&(e=b)});return e};a.prototype.getChartCoordinatesFromPoint=
|
||||
function(a,d){var c=a.series,g=c.xAxis;c=c.yAxis;var b=a.shapeArgs;if(g&&c){var e=w(a.clientX,a.plotX),k=a.plotY||0;a.isNode&&b&&h(b.x)&&h(b.y)&&(e=b.x,k=b.y);return d?{chartX:c.len+c.pos-k,chartY:g.len+g.pos-e}:{chartX:e+g.pos,chartY:k+c.pos}}if(b&&b.x&&b.y)return{chartX:b.x,chartY:b.y}};a.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var a=this.chart.container,d=v(a);this.chartPosition={left:d.left,top:d.top,scaleX:1,scaleY:1};var c=a.offsetWidth;a=a.offsetHeight;
|
||||
2<c&&2<a&&(this.chartPosition.scaleX=d.width/c,this.chartPosition.scaleY=d.height/a);return this.chartPosition};a.prototype.getCoordinates=function(a){var d={xAxis:[],yAxis:[]};this.chart.axes.forEach(function(c){d[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return d};a.prototype.getHoverData=function(a,e,c,g,b,f){var k=[];g=!(!g||!a);var h={chartX:f?f.chartX:void 0,chartY:f?f.chartY:void 0,shared:b};l(this,"beforeGetHoverData",h);var q=e&&!e.stickyTracking?
|
||||
[e]:c.filter(function(a){return h.filter?h.filter(a):a.visible&&!(!b&&a.directTouch)&&w(a.options.enableMouseTracking,!0)&&a.stickyTracking});var r=g||!f?a:this.findNearestKDPoint(q,b,f);e=r&&r.series;r&&(b&&!e.noSharedTooltip?(q=c.filter(function(a){return h.filter?h.filter(a):a.visible&&!(!b&&a.directTouch)&&w(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),q.forEach(function(b){var a=d(b.points,function(b){return b.x===r.x&&!b.isNull});t(a)&&(b.chart.isBoosting&&(a=b.getPoint(a)),k.push(a))})):
|
||||
k.push(r));h={hoverPoint:r};l(this,"afterGetHoverData",h);return{hoverPoint:h.hoverPoint,hoverSeries:e,hoverPoints:k}};a.prototype.getPointFromEvent=function(a){a=a.target;for(var d;a&&!d;)d=a.point,a=a.parentNode;return d};a.prototype.onTrackerMouseOut=function(a){a=a.relatedTarget||a.toElement;var d=this.chart.hoverSeries;this.isDirectTouch=!1;if(!(!d||!a||d.stickyTracking||this.inClass(a,"highcharts-tooltip")||this.inClass(a,"highcharts-series-"+d.index)&&this.inClass(a,"highcharts-tracker")))d.onMouseOut()};
|
||||
a.prototype.inClass=function(a,d){for(var c;a;){if(c=z(a,"class")){if(-1!==c.indexOf(d))return!0;if(-1!==c.indexOf("highcharts-container"))return!1}a=a.parentElement}};a.prototype.init=function(a,d){this.options=d;this.chart=a;this.runChartClick=!(!d.chart.events||!d.chart.events.click);this.pinchDown=[];this.lastValidTouch={};C&&(a.tooltip=new C(a,d.tooltip),this.followTouchMove=w(d.tooltip.followTouchMove,!0));this.setDOMEvents()};a.prototype.normalize=function(a,d){var c=a.touches,g=c?c.length?
|
||||
c.item(0):w(c.changedTouches,a.changedTouches)[0]:a;d||(d=this.getChartPosition());c=g.pageX-d.left;g=g.pageY-d.top;c/=d.scaleX;g/=d.scaleY;return e(a,{chartX:Math.round(c),chartY:Math.round(g)})};a.prototype.onContainerClick=function(a){var d=this.chart,c=d.hoverPoint;a=this.normalize(a);var g=d.plotLeft,b=d.plotTop;d.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(l(c.series,"click",e(a,{point:c})),d.hoverPoint&&c.firePointEvent("click",a)):(e(a,this.getCoordinates(a)),d.isInsidePlot(a.chartX-
|
||||
g,a.chartY-b,{visiblePlotOnly:!0})&&l(d,"click",a)))};a.prototype.onContainerMouseDown=function(a){var d=1===((a.buttons||a.button)&1);a=this.normalize(a);if(f.isFirefox&&0!==a.button)this.onContainerMouseMove(a);if("undefined"===typeof a.button||d)this.zoomOption(a),d&&a.preventDefault&&a.preventDefault(),this.dragStart(a)};a.prototype.onContainerMouseLeave=function(d){var e=F[w(a.hoverChartIndex,-1)],c=this.chart.tooltip;c&&c.shouldStickOnContact()&&this.inClass(d.relatedTarget,"highcharts-tooltip-container")||
|
||||
(d=this.normalize(d),e&&(d.relatedTarget||d.toElement)&&(e.pointer.reset(),e.pointer.chartPosition=void 0),c&&!c.isHidden&&this.reset())};a.prototype.onContainerMouseEnter=function(a){delete this.chartPosition};a.prototype.onContainerMouseMove=function(a){var d=this.chart;a=this.normalize(a);this.setHoverChartIndex();a.preventDefault||(a.returnValue=!1);("mousedown"===d.mouseIsDown||this.touchSelect(a))&&this.drag(a);d.openMenu||!this.inClass(a.target,"highcharts-tracker")&&!d.isInsidePlot(a.chartX-
|
||||
d.plotLeft,a.chartY-d.plotTop,{visiblePlotOnly:!0})||(this.inClass(a.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(a))};a.prototype.onDocumentTouchEnd=function(d){var e=F[w(a.hoverChartIndex,-1)];e&&e.pointer.drop(d)};a.prototype.onContainerTouchMove=function(a){if(this.touchSelect(a))this.onContainerMouseMove(a);else this.touch(a)};a.prototype.onContainerTouchStart=function(a){if(this.touchSelect(a))this.onContainerMouseDown(a);else this.zoomOption(a),this.touch(a,!0)};a.prototype.onDocumentMouseMove=
|
||||
function(a){var d=this.chart,c=this.chartPosition;a=this.normalize(a,c);var g=d.tooltip;!c||g&&g.isStickyOnContact()||d.isInsidePlot(a.chartX-d.plotLeft,a.chartY-d.plotTop,{visiblePlotOnly:!0})||this.inClass(a.target,"highcharts-tracker")||this.reset()};a.prototype.onDocumentMouseUp=function(d){var e=F[w(a.hoverChartIndex,-1)];e&&e.pointer.drop(d)};a.prototype.pinch=function(a){var d=this,c=d.chart,g=d.pinchDown,b=a.touches||[],f=b.length,h=d.lastValidTouch,q=d.hasZoom,m={},n=1===f&&(d.inClass(a.target,
|
||||
"highcharts-tracker")&&c.runTrackerClick||d.runChartClick),p={},t=d.selectionMarker;1<f?d.initiated=!0:1===f&&this.followTouchMove&&(d.initiated=!1);q&&d.initiated&&!n&&!1!==a.cancelable&&a.preventDefault();[].map.call(b,function(b){return d.normalize(b)});"touchstart"===a.type?([].forEach.call(b,function(b,a){g[a]={chartX:b.chartX,chartY:b.chartY}}),h.x=[g[0].chartX,g[1]&&g[1].chartX],h.y=[g[0].chartY,g[1]&&g[1].chartY],c.axes.forEach(function(b){if(b.zoomEnabled){var a=c.bounds[b.horiz?"h":"v"],
|
||||
d=b.minPixelPadding,g=b.toPixels(Math.min(w(b.options.min,b.dataMin),b.dataMin)),e=b.toPixels(Math.max(w(b.options.max,b.dataMax),b.dataMax)),f=Math.max(g,e);a.min=Math.min(b.pos,Math.min(g,e)-d);a.max=Math.max(b.pos+b.len,f+d)}}),d.res=!0):d.followTouchMove&&1===f?this.runPointActions(d.normalize(a)):g.length&&(l(c,"touchpan",{originalEvent:a},function(){t||(d.selectionMarker=t=e({destroy:I,touch:!0},c.plotBox));d.pinchTranslate(g,b,m,t,p,h);d.hasPinched=q;d.scaleGroups(m,p)}),d.res&&(d.res=!1,this.reset(!1,
|
||||
0)))};a.prototype.pinchTranslate=function(a,d,c,g,b,e){this.zoomHor&&this.pinchTranslateDirection(!0,a,d,c,g,b,e);this.zoomVert&&this.pinchTranslateDirection(!1,a,d,c,g,b,e)};a.prototype.pinchTranslateDirection=function(a,d,c,g,b,e,f,h){var k=this.chart,r=a?"x":"y",l=a?"X":"Y",m="chart"+l,q=a?"width":"height",n=k["plot"+(a?"Left":"Top")],p=k.inverted,x=k.bounds[a?"h":"v"],t=1===d.length,D=d[0][m],w=!t&&d[1][m];d=function(){"number"===typeof A&&20<Math.abs(D-w)&&(v=h||Math.abs(N-A)/Math.abs(D-w));
|
||||
E=(n-N)/v+D;y=k["plot"+(a?"Width":"Height")]/v};var y,E,v=h||1,N=c[0][m],A=!t&&c[1][m];d();c=E;if(c<x.min){c=x.min;var z=!0}else c+y>x.max&&(c=x.max-y,z=!0);z?(N-=.8*(N-f[r][0]),"number"===typeof A&&(A-=.8*(A-f[r][1])),d()):f[r]=[N,A];p||(e[r]=E-n,e[q]=y);e=p?1/v:v;b[q]=y;b[r]=c;g[p?a?"scaleY":"scaleX":"scale"+l]=v;g["translate"+l]=e*n+(N-e*D)};a.prototype.reset=function(a,d){var c=this.chart,g=c.hoverSeries,b=c.hoverPoint,e=c.hoverPoints,f=c.tooltip,k=f&&f.shared?e:b;a&&k&&y(k).forEach(function(b){b.series.isCartesian&&
|
||||
"undefined"===typeof b.plotX&&(a=!1)});if(a)f&&k&&y(k).length&&(f.refresh(k),f.shared&&e?e.forEach(function(b){b.setState(b.state,!0);b.series.isCartesian&&(b.series.xAxis.crosshair&&b.series.xAxis.drawCrosshair(null,b),b.series.yAxis.crosshair&&b.series.yAxis.drawCrosshair(null,b))}):b&&(b.setState(b.state,!0),c.axes.forEach(function(a){a.crosshair&&b.series[a.coll]===a&&a.drawCrosshair(null,b)})));else{if(b)b.onMouseOut();e&&e.forEach(function(b){b.setState()});if(g)g.onMouseOut();f&&f.hide(d);
|
||||
this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());c.axes.forEach(function(b){b.hideCrosshair()});this.hoverX=c.hoverPoints=c.hoverPoint=null}};a.prototype.runPointActions=function(e,f){var c=this.chart,g=c.tooltip&&c.tooltip.options.enabled?c.tooltip:void 0,b=g?g.shared:!1,k=f||c.hoverPoint,h=k&&k.series||c.hoverSeries;f=this.getHoverData(k,h,c.series,(!e||"touchmove"!==e.type)&&(!!f||h&&h.directTouch&&this.isDirectTouch),b,e);k=f.hoverPoint;h=f.hoverSeries;var l=f.hoverPoints;f=h&&
|
||||
h.tooltipOptions.followPointer&&!h.tooltipOptions.split;var m=b&&h&&!h.noSharedTooltip;if(k&&(k!==c.hoverPoint||g&&g.isHidden)){(c.hoverPoints||[]).forEach(function(b){-1===l.indexOf(b)&&b.setState()});if(c.hoverSeries!==h)h.onMouseOver();this.applyInactiveState(l);(l||[]).forEach(function(b){b.setState("hover")});c.hoverPoint&&c.hoverPoint.firePointEvent("mouseOut");if(!k.series)return;c.hoverPoints=l;c.hoverPoint=k;k.firePointEvent("mouseOver",void 0,function(){g&&k&&g.refresh(m?l:k,e)})}else f&&
|
||||
g&&!g.isHidden&&(b=g.getAnchor([{}],e),c.isInsidePlot(b[0],b[1],{visiblePlotOnly:!0})&&g.updatePosition({plotX:b[0],plotY:b[1]}));this.unDocMouseMove||(this.unDocMouseMove=B(c.container.ownerDocument,"mousemove",function(b){var c=F[a.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(b)}),this.eventsToUnbind.push(this.unDocMouseMove));c.axes.forEach(function(b){var a=w((b.crosshair||{}).snap,!0),g;a&&((g=c.hoverPoint)&&g.series[b.coll]===b||(g=d(l,function(a){return a.series&&a.series[b.coll]===
|
||||
b})));g||!a?b.drawCrosshair(e,g):b.hideCrosshair()})};a.prototype.scaleGroups=function(a,d){var c=this.chart;c.series.forEach(function(g){var b=a||g.getPlotBox();g.group&&(g.xAxis&&g.xAxis.zoomEnabled||c.mapView)&&(g.group.attr(b),g.markerGroup&&(g.markerGroup.attr(b),g.markerGroup.clip(d?c.clipRect:null)),g.dataLabelsGroup&&g.dataLabelsGroup.attr(b))});c.clipRect.attr(d||c.clipBox)};a.prototype.setDOMEvents=function(){var d=this,e=this.chart.container,c=e.ownerDocument;e.onmousedown=this.onContainerMouseDown.bind(this);
|
||||
e.onmousemove=this.onContainerMouseMove.bind(this);e.onclick=this.onContainerClick.bind(this);this.eventsToUnbind.push(B(e,"mouseenter",this.onContainerMouseEnter.bind(this)));this.eventsToUnbind.push(B(e,"mouseleave",this.onContainerMouseLeave.bind(this)));a.unbindDocumentMouseUp||(a.unbindDocumentMouseUp=B(c,"mouseup",this.onDocumentMouseUp.bind(this)));for(var g=this.chart.renderTo.parentElement;g&&"BODY"!==g.tagName;)this.eventsToUnbind.push(B(g,"scroll",function(){delete d.chartPosition})),g=
|
||||
g.parentElement;f.hasTouch&&(this.eventsToUnbind.push(B(e,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(B(e,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),a.unbindDocumentTouchEnd||(a.unbindDocumentTouchEnd=B(c,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))};a.prototype.setHoverChartIndex=function(){var d=this.chart,e=f.charts[w(a.hoverChartIndex,-1)];if(e&&e!==d)e.pointer.onContainerMouseLeave({relatedTarget:d.container});
|
||||
e&&e.mouseIsDown||(a.hoverChartIndex=d.index)};a.prototype.touch=function(a,d){var c=this.chart,e;this.setHoverChartIndex();if(1===a.touches.length)if(a=this.normalize(a),(e=c.isInsidePlot(a.chartX-c.plotLeft,a.chartY-c.plotTop,{visiblePlotOnly:!0}))&&!c.openMenu){d&&this.runPointActions(a);if("touchmove"===a.type){d=this.pinchDown;var b=d[0]?4<=Math.sqrt(Math.pow(d[0].chartX-a.chartX,2)+Math.pow(d[0].chartY-a.chartY,2)):!1}w(b,!0)&&this.pinch(a)}else d&&this.reset();else 2===a.touches.length&&this.pinch(a)};
|
||||
a.prototype.touchSelect=function(a){return!(!this.chart.options.chart.zoomBySingleTouch||!a.touches||1!==a.touches.length)};a.prototype.zoomOption=function(a){var d=this.chart,c=d.options.chart;d=d.inverted;var e=c.zoomType||"";/touch/.test(a.type)&&(e=w(c.pinchType,e));this.zoomX=a=/x/.test(e);this.zoomY=c=/y/.test(e);this.zoomHor=a&&!d||c&&d;this.zoomVert=c&&!d||a&&d;this.hasZoom=a||c};return a}();"";return a});M(f,"Core/MSPointer.js",[f["Core/Globals.js"],f["Core/Pointer.js"],f["Core/Utilities.js"]],
|
||||
function(a,f,C){function F(){var a=[];a.item=function(a){return this[a]};d(h,function(d){a.push({pageX:d.pageX,pageY:d.pageY,target:d.target})});return a}function u(a,d,e,h){var l=I[f.hoverChartIndex||NaN];"touch"!==a.pointerType&&a.pointerType!==a.MSPOINTER_TYPE_TOUCH||!l||(l=l.pointer,h(a),l[d]({type:e,target:a.currentTarget,preventDefault:z,touches:F()}))}var H=this&&this.__extends||function(){var a=function(d,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=
|
||||
d}||function(a,d){for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])};return a(d,e)};return function(d,e){function f(){this.constructor=d}a(d,e);d.prototype=null===e?Object.create(e):(f.prototype=e.prototype,new f)}}(),I=a.charts,B=a.doc,z=a.noop,p=a.win,m=C.addEvent,e=C.css,d=C.objectEach,l=C.removeEvent,h={},t=!!p.PointerEvent;return function(d){function f(){return null!==d&&d.apply(this,arguments)||this}H(f,d);f.isRequired=function(){return!(a.hasTouch||!p.PointerEvent&&!p.MSPointerEvent)};f.prototype.batchMSEvents=
|
||||
function(a){a(this.chart.container,t?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,t?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(B,t?"pointerup":"MSPointerUp",this.onDocumentPointerUp)};f.prototype.destroy=function(){this.batchMSEvents(l);d.prototype.destroy.call(this)};f.prototype.init=function(a,f){d.prototype.init.call(this,a,f);this.hasZoom&&e(a.container,{"-ms-touch-action":"none","touch-action":"none"})};f.prototype.onContainerPointerDown=
|
||||
function(a){u(a,"onContainerTouchStart","touchstart",function(a){h[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})};f.prototype.onContainerPointerMove=function(a){u(a,"onContainerTouchMove","touchmove",function(a){h[a.pointerId]={pageX:a.pageX,pageY:a.pageY};h[a.pointerId].target||(h[a.pointerId].target=a.currentTarget)})};f.prototype.onDocumentPointerUp=function(a){u(a,"onDocumentTouchEnd","touchend",function(a){delete h[a.pointerId]})};f.prototype.setDOMEvents=function(){d.prototype.setDOMEvents.call(this);
|
||||
(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(m)};return f}(f)});M(f,"Core/Legend/Legend.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/FormatUtilities.js"],f["Core/Globals.js"],f["Core/Series/Point.js"],f["Core/Renderer/RendererUtilities.js"],f["Core/Utilities.js"]],function(a,f,C,G,u,H){var F=a.animObject,B=a.setAnimation,z=f.format;a=C.isFirefox;var p=C.marginNames;C=C.win;var m=u.distribute,e=H.addEvent,d=H.createElement,l=H.css,h=H.defined,t=H.discardElement,n=H.find,v=H.fireEvent,
|
||||
w=H.isNumber,y=H.merge,A=H.pick,q=H.relativeLength,k=H.stableSort,c=H.syncTimeout;u=H.wrap;H=function(){function a(b,a){this.allItems=[];this.contentGroup=this.box=void 0;this.display=!1;this.group=void 0;this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0;this.options=void 0;this.padding=0;this.pages=[];this.proximate=!1;this.scrollGroup=
|
||||
void 0;this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0;this.chart=b;this.init(b,a)}a.prototype.init=function(b,a){this.chart=b;this.setOptions(a);a.enabled&&(this.render(),e(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=e(this.chart,"render",function(){this.legend.proximatePositions();this.legend.positionItems()}):this.unchartrender&&this.unchartrender())};a.prototype.setOptions=function(b){var a=A(b.padding,
|
||||
8);this.options=b;this.chart.styledMode||(this.itemStyle=b.itemStyle,this.itemHiddenStyle=y(this.itemStyle,b.itemHiddenStyle));this.itemMarginTop=b.itemMarginTop||0;this.itemMarginBottom=b.itemMarginBottom||0;this.padding=a;this.initialItemY=a-5;this.symbolWidth=A(b.symbolWidth,16);this.pages=[];this.proximate="proximate"===b.layout&&!this.chart.inverted;this.baseline=void 0};a.prototype.update=function(b,a){var c=this.chart;this.setOptions(y(!0,this.options,b));this.destroy();c.isDirtyLegend=c.isDirtyBox=
|
||||
!0;A(a,!0)&&c.redraw();v(this,"afterUpdate")};a.prototype.colorizeItem=function(b,a){b.legendGroup[a?"removeClass":"addClass"]("highcharts-legend-item-hidden");if(!this.chart.styledMode){var c=this.options,d=b.legendItem,e=b.legendLine,g=b.legendSymbol,f=this.itemHiddenStyle.color;c=a?c.itemStyle.color:f;var k=a?b.color||f:f,h=b.options&&b.options.marker,l={fill:k};d&&d.css({fill:c,color:c});e&&e.attr({stroke:k});g&&(h&&g.isMarker&&(l=b.pointAttribs(),a||(l.stroke=l.fill=f)),g.attr(l))}v(this,"afterColorizeItem",
|
||||
{item:b,visible:a})};a.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this);this.chart.isResizing||this.positionCheckboxes()};a.prototype.positionItem=function(b){var a=this,c=this.options,d=c.symbolPadding,e=!c.rtl,g=b._legendItemPos;c=g[0];g=g[1];var f=b.checkbox,k=b.legendGroup;k&&k.element&&(d={translateX:e?c:this.legendWidth-c-2*d-4,translateY:g},e=function(){v(a,"afterPositionItem",{item:b})},h(k.translateY)?k.animate(d,void 0,e):(k.attr(d),e()));f&&(f.x=c,f.y=g)};
|
||||
a.prototype.destroyItem=function(b){var a=b.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(a){b[a]&&(b[a]=b[a].destroy())});a&&t(b.checkbox)};a.prototype.destroy=function(){function b(b){this[b]&&(this[b]=this[b].destroy())}this.getAllItems().forEach(function(a){["legendItem","legendGroup"].forEach(b,a)});"clipRect up down pager nav box title group".split(" ").forEach(b,this);this.display=null};a.prototype.positionCheckboxes=function(){var b=this.group&&this.group.alignAttr,
|
||||
a=this.clipHeight||this.legendHeight,c=this.titleHeight;if(b){var d=b.translateY;this.allItems.forEach(function(e){var g=e.checkbox;if(g){var f=d+c+g.y+(this.scrollOffset||0)+3;l(g,{left:b.translateX+e.checkboxOffset+g.x-20+"px",top:f+"px",display:this.proximate||f>d-6&&f<d+a-6?"":"none"})}},this)}};a.prototype.renderTitle=function(){var b=this.options,a=this.padding,c=b.title,d=0;c.text&&(this.title||(this.title=this.chart.renderer.label(c.text,a-3,a-4,void 0,void 0,void 0,b.useHTML,void 0,"legend-title").attr({zIndex:1}),
|
||||
this.chart.styledMode||this.title.css(c.style),this.title.add(this.group)),c.width||this.title.css({width:this.maxLegendWidth+"px"}),b=this.title.getBBox(),d=b.height,this.offsetWidth=b.width,this.contentGroup.attr({translateY:d}));this.titleHeight=d};a.prototype.setText=function(b){var a=this.options;b.legendItem.attr({text:a.labelFormat?z(a.labelFormat,b,this.chart):a.labelFormatter.call(b)})};a.prototype.renderItem=function(b){var a=this.chart,c=a.renderer,d=this.options,e=this.symbolWidth,g=d.symbolPadding||
|
||||
0,f=this.itemStyle,k=this.itemHiddenStyle,h="horizontal"===d.layout?A(d.itemDistance,20):0,l=!d.rtl,m=!b.series,n=!m&&b.series.drawLegendSymbol?b.series:b,q=n.options,p=this.createCheckboxForItem&&q&&q.showCheckbox,t=d.useHTML,w=b.options.className,E=b.legendItem;q=e+g+h+(p?20:0);E||(b.legendGroup=c.g("legend-item").addClass("highcharts-"+n.type+"-series highcharts-color-"+b.colorIndex+(w?" "+w:"")+(m?" highcharts-series-"+b.index:"")).attr({zIndex:1}).add(this.scrollGroup),b.legendItem=E=c.text("",
|
||||
l?e+g:-g,this.baseline||0,t),a.styledMode||E.css(y(b.visible?f:k)),E.attr({align:l?"left":"right",zIndex:2}).add(b.legendGroup),this.baseline||(this.fontMetrics=c.fontMetrics(a.styledMode?12:f.fontSize,E),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,E.attr("y",this.baseline),this.symbolHeight=d.symbolHeight||this.fontMetrics.f,d.squareSymbol&&(this.symbolWidth=A(d.symbolWidth,Math.max(this.symbolHeight,16)),q=this.symbolWidth+g+h+(p?20:0),l&&E.attr("x",this.symbolWidth+g))),n.drawLegendSymbol(this,
|
||||
b),this.setItemEvents&&this.setItemEvents(b,E,t));p&&!b.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(b);this.colorizeItem(b,b.visible);!a.styledMode&&f.width||E.css({width:(d.itemWidth||this.widthOption||a.spacingBox.width)-q+"px"});this.setText(b);a=E.getBBox();c=this.fontMetrics&&this.fontMetrics.h||0;b.itemWidth=b.checkboxOffset=d.itemWidth||b.legendItemWidth||a.width+q;this.maxItemWidth=Math.max(this.maxItemWidth,b.itemWidth);this.totalItemWidth+=b.itemWidth;this.itemHeight=
|
||||
b.itemHeight=Math.round(b.legendItemHeight||(a.height>1.5*c?a.height:c))};a.prototype.layoutItem=function(b){var a=this.options,c=this.padding,d="horizontal"===a.layout,e=b.itemHeight,g=this.itemMarginBottom,f=this.itemMarginTop,k=d?A(a.itemDistance,20):0,h=this.maxLegendWidth;a=a.alignColumns&&this.totalItemWidth>h?this.maxItemWidth:b.itemWidth;d&&this.itemX-c+a>h&&(this.itemX=c,this.lastLineHeight&&(this.itemY+=f+this.lastLineHeight+g),this.lastLineHeight=0);this.lastItemY=f+this.itemY+g;this.lastLineHeight=
|
||||
Math.max(e,this.lastLineHeight);b._legendItemPos=[this.itemX,this.itemY];d?this.itemX+=a:(this.itemY+=f+e+g,this.lastLineHeight=e);this.offsetWidth=this.widthOption||Math.max((d?this.itemX-c-(b.checkbox?0:k):a)+c,this.offsetWidth)};a.prototype.getAllItems=function(){var b=[];this.chart.series.forEach(function(a){var c=a&&a.options;a&&A(c.showInLegend,h(c.linkedTo)?!1:void 0,!0)&&(b=b.concat(a.legendItems||("point"===c.legendType?a.data:a)))});v(this,"afterGetAllItems",{allItems:b});return b};a.prototype.getAlignment=
|
||||
function(){var b=this.options;return this.proximate?b.align.charAt(0)+"tv":b.floating?"":b.align.charAt(0)+b.verticalAlign.charAt(0)+b.layout.charAt(0)};a.prototype.adjustMargins=function(b,a){var c=this.chart,d=this.options,e=this.getAlignment();e&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(g,f){g.test(e)&&!h(b[f])&&(c[p[f]]=Math.max(c[p[f]],c.legend[(f+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][f]*d[f%2?"x":"y"]+A(d.margin,12)+a[f]+(c.titleOffset[f]||0)))})};
|
||||
a.prototype.proximatePositions=function(){var b=this.chart,a=[],c="left"===this.options.align;this.allItems.forEach(function(d){var e;var g=c;if(d.yAxis){d.xAxis.options.reversed&&(g=!g);d.points&&(e=n(g?d.points:d.points.slice(0).reverse(),function(b){return w(b.plotY)}));g=this.itemMarginTop+d.legendItem.getBBox().height+this.itemMarginBottom;var f=d.yAxis.top-b.plotTop;d.visible?(e=e?e.plotY:d.yAxis.height,e+=f-.3*g):e=f+d.yAxis.height;a.push({target:e,size:g,item:d})}},this);m(a,b.plotHeight).forEach(function(a){a.item._legendItemPos&&
|
||||
(a.item._legendItemPos[1]=b.plotTop-b.spacing[0]+a.pos)})};a.prototype.render=function(){var b=this.chart,a=b.renderer,c=this.options,d=this.padding,e=this.getAllItems(),g=this.group,f=this.box;this.itemX=d;this.itemY=this.initialItemY;this.lastItemY=this.offsetWidth=0;this.widthOption=q(c.width,b.spacingBox.width-d);var h=b.spacingBox.width-2*d-c.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(h/=2);this.maxLegendWidth=this.widthOption||h;g||(this.group=g=a.g("legend").addClass(c.className||
|
||||
"").attr({zIndex:7}).add(),this.contentGroup=a.g().attr({zIndex:1}).add(g),this.scrollGroup=a.g().add(this.contentGroup));this.renderTitle();k(e,function(b,a){return(b.options&&b.options.legendIndex||0)-(a.options&&a.options.legendIndex||0)});c.reversed&&e.reverse();this.allItems=e;this.display=h=!!e.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;e.forEach(this.renderItem,this);e.forEach(this.layoutItem,this);e=(this.widthOption||this.offsetWidth)+d;var l=this.lastItemY+
|
||||
this.lastLineHeight+this.titleHeight;l=this.handleOverflow(l);l+=d;f||(this.box=f=a.rect().addClass("highcharts-legend-box").attr({r:c.borderRadius}).add(g));b.styledMode||f.attr({stroke:c.borderColor,"stroke-width":c.borderWidth||0,fill:c.backgroundColor||"none"}).shadow(c.shadow);if(0<e&&0<l)f[f.placed?"animate":"attr"](f.crisp.call({},{x:0,y:0,width:e,height:l},f.strokeWidth()));f[h?"show":"hide"]();b.styledMode&&"none"===g.getStyle("display")&&(e=l=0);this.legendWidth=e;this.legendHeight=l;h&&
|
||||
this.align();this.proximate||this.positionItems();v(this,"afterRender")};a.prototype.align=function(b){void 0===b&&(b=this.chart.spacingBox);var a=this.chart,c=this.options,d=b.y;/(lth|ct|rth)/.test(this.getAlignment())&&0<a.titleOffset[0]?d+=a.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<a.titleOffset[2]&&(d-=a.titleOffset[2]);d!==b.y&&(b=y(b,{y:d}));a.hasRendered||(this.group.placed=!1);this.group.align(y(c,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?
|
||||
"top":c.verticalAlign}),!0,b)};a.prototype.handleOverflow=function(b){var a=this,c=this.chart,d=c.renderer,e=this.options,g=e.y,f="top"===e.verticalAlign,k=this.padding,h=e.maxHeight,l=e.navigation,m=A(l.animation,!0),n=l.arrowSize||12,q=this.pages,p=this.allItems,t=function(b){"number"===typeof b?v.attr({height:b}):v&&(a.clipRect=v.destroy(),a.contentGroup.clip());a.contentGroup.div&&(a.contentGroup.div.style.clip=b?"rect("+k+"px,9999px,"+(k+b)+"px,0)":"auto")},w=function(b){a[b]=d.circle(0,0,1.3*
|
||||
n).translate(n/2,n/2).add(N);c.styledMode||a[b].attr("fill","rgba(0,0,0,0.0001)");return a[b]},E,y;g=c.spacingBox.height+(f?-g:g)-k;var N=this.nav,v=this.clipRect;"horizontal"!==e.layout||"middle"===e.verticalAlign||e.floating||(g/=2);h&&(g=Math.min(g,h));q.length=0;b&&0<g&&b>g&&!1!==l.enabled?(this.clipHeight=E=Math.max(g-20-this.titleHeight-k,0),this.currentPage=A(this.currentPage,1),this.fullHeight=b,p.forEach(function(b,a){var c=b._legendItemPos[1],d=Math.round(b.legendItem.getBBox().height),
|
||||
e=q.length;if(!e||c-q[e-1]>E&&(y||c)!==q[e-1])q.push(y||c),e++;b.pageIx=e-1;y&&(p[a-1].pageIx=e-1);a===p.length-1&&c+d-q[e-1]>E&&d<=E&&(q.push(c),b.pageIx=e);c!==y&&(y=c)}),v||(v=a.clipRect=d.clipRect(0,k,9999,0),a.contentGroup.clip(v)),t(E),N||(this.nav=N=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,n,n).add(N),w("upTracker").on("click",function(){a.scroll(-1,m)}),this.pager=d.text("",15,10).addClass("highcharts-legend-navigation"),!c.styledMode&&l.style&&this.pager.css(l.style),
|
||||
this.pager.add(N),this.down=d.symbol("triangle-down",0,0,n,n).add(N),w("downTracker").on("click",function(){a.scroll(1,m)})),a.scroll(0),b=g):N&&(t(),this.nav=N.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return b};a.prototype.scroll=function(b,a){var d=this,e=this.chart,g=this.pages,f=g.length,k=this.clipHeight,h=this.options.navigation,l=this.pager,m=this.padding,n=this.currentPage+b;n>f&&(n=f);0<n&&("undefined"!==typeof a&&B(a,e),this.nav.attr({translateX:m,translateY:k+
|
||||
this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach(function(b){b.attr({"class":1===n?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),l.attr({text:n+"/"+f}),[this.down,this.downTracker].forEach(function(b){b.attr({x:18+this.pager.getBBox().width,"class":n===f?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),e.styledMode||(this.up.attr({fill:1===n?h.inactiveColor:h.activeColor}),this.upTracker.css({cursor:1===n?"default":
|
||||
"pointer"}),this.down.attr({fill:n===f?h.inactiveColor:h.activeColor}),this.downTracker.css({cursor:n===f?"default":"pointer"})),this.scrollOffset=-g[n-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=n,this.positionCheckboxes(),b=F(A(a,e.renderer.globalAnimation,!0)),c(function(){v(d,"afterScroll",{currentPage:n})},b.duration))};a.prototype.setItemEvents=function(b,a,c){var d=this,e=d.chart.renderer.boxWrapper,g=b instanceof G,f="highcharts-legend-"+
|
||||
(g?"point":"series")+"-active",k=d.chart.styledMode,h=function(a){d.allItems.forEach(function(c){b!==c&&[c].concat(c.linkedSeries||[]).forEach(function(b){b.setState(a,!g)})})};(c?[a,b.legendSymbol]:[b.legendGroup]).forEach(function(c){if(c)c.on("mouseover",function(){b.visible&&h("inactive");b.setState("hover");b.visible&&e.addClass(f);k||a.css(d.options.itemHoverStyle)}).on("mouseout",function(){d.chart.styledMode||a.css(y(b.visible?d.itemStyle:d.itemHiddenStyle));h("");e.removeClass(f);b.setState()}).on("click",
|
||||
function(a){var c=function(){b.setVisible&&b.setVisible();h(b.visible?"inactive":"")};e.removeClass(f);a={browserEvent:a};b.firePointEvent?b.firePointEvent("legendItemClick",a,c):v(b,"legendItemClick",a,c)})})};a.prototype.createCheckboxForItem=function(b){b.checkbox=d("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:b.selected,defaultChecked:b.selected},this.options.itemCheckboxStyle,this.chart.container);e(b.checkbox,"click",function(a){v(b.series||b,"checkboxClick",{checked:a.target.checked,
|
||||
item:b},function(){b.select()})})};return a}();(/Trident\/7\.0/.test(C.navigator&&C.navigator.userAgent)||a)&&u(H.prototype,"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d();c.bubbleLegend||setTimeout(d)});"";return H});M(f,"Core/Series/SeriesRegistry.js",[f["Core/Globals.js"],f["Core/DefaultOptions.js"],f["Core/Series/Point.js"],f["Core/Utilities.js"]],function(a,f,C,G){var u=f.defaultOptions,F=G.error,I=G.extendClass,B=G.merge,z;(function(f){function m(a,d){var e=
|
||||
u.plotOptions||{},h=d.defaultOptions;d.prototype.pointClass||(d.prototype.pointClass=C);d.prototype.type=a;h&&(e[a]=h);f.seriesTypes[a]=d}f.seriesTypes=a.seriesTypes;f.getSeries=function(a,d){void 0===d&&(d={});var e=a.options.chart;e=d.type||e.type||e.defaultSeriesType||"";var h=f.seriesTypes[e];f||F(17,!0,a,{missingModuleFor:e});e=new h;"function"===typeof e.init&&e.init(a,d);return e};f.registerSeriesType=m;f.seriesType=function(a,d,l,h,p){var e=u.plotOptions||{};d=d||"";e[a]=B(e[d],l);m(a,I(f.seriesTypes[d]||
|
||||
function(){},h));f.seriesTypes[a].prototype.type=a;p&&(f.seriesTypes[a].prototype.pointClass=I(C,p));return f.seriesTypes[a]}})(z||(z={}));return z});M(f,"Core/Chart/Chart.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/Axis/Axis.js"],f["Core/FormatUtilities.js"],f["Core/Foundation.js"],f["Core/Globals.js"],f["Core/Legend/Legend.js"],f["Core/MSPointer.js"],f["Core/DefaultOptions.js"],f["Core/Pointer.js"],f["Core/Renderer/RendererRegistry.js"],f["Core/Series/SeriesRegistry.js"],f["Core/Renderer/SVG/SVGRenderer.js"],
|
||||
f["Core/Time.js"],f["Core/Utilities.js"],f["Core/Renderer/HTML/AST.js"]],function(a,f,C,G,u,H,I,B,z,p,m,e,d,l,h){var t=a.animate,n=a.animObject,v=a.setAnimation,w=C.numberFormat,y=G.registerEventOptions,A=u.charts,q=u.doc,k=u.marginNames,c=u.svg,g=u.win,b=B.defaultOptions,r=B.defaultTime,x=m.seriesTypes,D=l.addEvent,K=l.attr,F=l.cleanRecursively,Q=l.createElement,O=l.css,W=l.defined,Z=l.discardElement,L=l.erase,J=l.error,M=l.extend,da=l.find,R=l.fireEvent,ea=l.getStyle,E=l.isArray,T=l.isNumber,N=
|
||||
l.isObject,U=l.isString,V=l.merge,X=l.objectEach,S=l.pick,fa=l.pInt,aa=l.relativeLength,ia=l.removeEvent,ha=l.splat,ba=l.syncTimeout,ka=l.uniqueKey;a=function(){function a(b,a,c){this.series=this.renderTo=this.renderer=this.pointer=this.pointCount=this.plotWidth=this.plotTop=this.plotLeft=this.plotHeight=this.plotBox=this.options=this.numberFormatter=this.margin=this.legend=this.labelCollectors=this.isResizing=this.index=this.eventOptions=this.container=this.colorCounter=this.clipBox=this.chartWidth=
|
||||
this.chartHeight=this.bounds=this.axisOffset=this.axes=void 0;this.sharedClips={};this.yAxis=this.xAxis=this.userOptions=this.titleOffset=this.time=this.symbolCounter=this.spacingBox=this.spacing=void 0;this.getArgs(b,a,c)}a.chart=function(b,c,d){return new a(b,c,d)};a.prototype.getArgs=function(b,a,c){U(b)||b.nodeName?(this.renderTo=b,this.init(a,c)):this.init(b,a)};a.prototype.init=function(a,c){var e=a.plotOptions||{};R(this,"init",{args:arguments},function(){var g=V(b,a),f=g.chart;X(g.plotOptions,
|
||||
function(b,a){N(b)&&(b.tooltip=e[a]&&V(e[a].tooltip)||void 0)});g.tooltip.userOptions=a.chart&&a.chart.forExport&&a.tooltip.userOptions||a.tooltip;this.userOptions=a;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.labelCollectors=[];this.callback=c;this.isResizing=0;this.options=g;this.axes=[];this.series=[];this.time=a.time&&Object.keys(a.time).length?new d(a.time):u.time;this.numberFormatter=f.numberFormatter||w;this.styledMode=f.styledMode;this.hasCartesianSeries=f.showAxes;this.index=
|
||||
A.length;A.push(this);u.chartCount++;y(this,f);this.xAxis=[];this.yAxis=[];this.pointCount=this.colorCounter=this.symbolCounter=0;R(this,"afterInit");this.firstRender()})};a.prototype.initSeries=function(b){var a=this.options.chart;a=b.type||a.type||a.defaultSeriesType;var c=x[a];c||J(17,!0,this,{missingModuleFor:a});a=new c;"function"===typeof a.init&&a.init(this,b);return a};a.prototype.setSeriesData=function(){this.getSeriesOrderByLinks().forEach(function(b){b.points||b.data||!b.enabledDataSorting||
|
||||
b.setData(b.options.data,!1)})};a.prototype.getSeriesOrderByLinks=function(){return this.series.concat().sort(function(b,a){return b.linkedSeries.length||a.linkedSeries.length?a.linkedSeries.length-b.linkedSeries.length:0})};a.prototype.orderSeries=function(b){var a=this.series;b=b||0;for(var c=a.length;b<c;++b)a[b]&&(a[b].index=b,a[b].name=a[b].getName())};a.prototype.isInsidePlot=function(b,a,c){void 0===c&&(c={});var d=this.inverted,e=this.plotBox,g=this.plotLeft,f=this.plotTop,k=this.scrollablePlotBox,
|
||||
h=0;var l=0;c.visiblePlotOnly&&this.scrollingContainer&&(l=this.scrollingContainer,h=l.scrollLeft,l=l.scrollTop);var m=c.series;e=c.visiblePlotOnly&&k||e;k=c.inverted?a:b;a=c.inverted?b:a;b={x:k,y:a,isInsidePlot:!0};if(!c.ignoreX){var n=m&&(d?m.yAxis:m.xAxis)||{pos:g,len:Infinity};k=c.paneCoordinates?n.pos+k:g+k;k>=Math.max(h+g,n.pos)&&k<=Math.min(h+g+e.width,n.pos+n.len)||(b.isInsidePlot=!1)}!c.ignoreY&&b.isInsidePlot&&(d=m&&(d?m.xAxis:m.yAxis)||{pos:f,len:Infinity},c=c.paneCoordinates?d.pos+a:f+
|
||||
a,c>=Math.max(l+f,d.pos)&&c<=Math.min(l+f+e.height,d.pos+d.len)||(b.isInsidePlot=!1));R(this,"afterIsInsidePlot",b);return b.isInsidePlot};a.prototype.redraw=function(b){R(this,"beforeRedraw");var a=this.hasCartesianSeries?this.axes:this.colorAxis||[],c=this.series,d=this.pointer,e=this.legend,g=this.userOptions.legend,f=this.renderer,k=f.isHidden(),h=[],l=this.isDirtyBox,m=this.isDirtyLegend;this.setResponsive&&this.setResponsive(!1);v(this.hasRendered?b:!1,this);k&&this.temporaryDisplay();this.layOutTitles();
|
||||
for(b=c.length;b--;){var n=c[b];if(n.options.stacking||n.options.centerInCategory){var q=!0;if(n.isDirty){var E=!0;break}}}if(E)for(b=c.length;b--;)n=c[b],n.options.stacking&&(n.isDirty=!0);c.forEach(function(b){b.isDirty&&("point"===b.options.legendType?("function"===typeof b.updateTotals&&b.updateTotals(),m=!0):g&&(g.labelFormatter||g.labelFormat)&&(m=!0));b.isDirtyData&&R(b,"updatedData")});m&&e&&e.options.enabled&&(e.render(),this.isDirtyLegend=!1);q&&this.getStacks();a.forEach(function(b){b.updateNames();
|
||||
b.setScale()});this.getMargins();a.forEach(function(b){b.isDirty&&(l=!0)});a.forEach(function(b){var a=b.min+","+b.max;b.extKey!==a&&(b.extKey=a,h.push(function(){R(b,"afterSetExtremes",M(b.eventArgs,b.getExtremes()));delete b.eventArgs}));(l||q)&&b.redraw()});l&&this.drawChartBox();R(this,"predraw");c.forEach(function(b){(l||b.isDirty)&&b.visible&&b.redraw();b.isDirtyData=!1});d&&d.reset(!0);f.draw();R(this,"redraw");R(this,"render");k&&this.temporaryDisplay(!0);h.forEach(function(b){b.call()})};
|
||||
a.prototype.get=function(b){function a(a){return a.id===b||a.options&&a.options.id===b}for(var c=this.series,d=da(this.axes,a)||da(this.series,a),e=0;!d&&e<c.length;e++)d=da(c[e].points||[],a);return d};a.prototype.getAxes=function(){var b=this,a=this.options,c=a.xAxis=ha(a.xAxis||{});a=a.yAxis=ha(a.yAxis||{});R(this,"getAxes");c.forEach(function(b,a){b.index=a;b.isX=!0});a.forEach(function(b,a){b.index=a});c.concat(a).forEach(function(a){new f(b,a)});R(this,"afterGetAxes")};a.prototype.getSelectedPoints=
|
||||
function(){return this.series.reduce(function(b,a){a.getPointsCollection().forEach(function(a){S(a.selectedStaging,a.selected)&&b.push(a)});return b},[])};a.prototype.getSelectedSeries=function(){return this.series.filter(function(b){return b.selected})};a.prototype.setTitle=function(b,a,c){this.applyDescription("title",b);this.applyDescription("subtitle",a);this.applyDescription("caption",void 0);this.layOutTitles(c)};a.prototype.applyDescription=function(b,a){var c=this,d="title"===b?{color:"#333333",
|
||||
fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};d=this.options[b]=V(!this.styledMode&&{style:d},this.options[b],a);var e=this[b];e&&a&&(this[b]=e=e.destroy());d&&!e&&(e=this.renderer.text(d.text,0,0,d.useHTML).attr({align:d.align,"class":"highcharts-"+b,zIndex:d.zIndex||4}).add(),e.update=function(a){c[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[b]](a)},this.styledMode||e.css(d.style),this[b]=e)};a.prototype.layOutTitles=function(b){var a=[0,0,0],c=this.renderer,
|
||||
d=this.spacingBox;["title","subtitle","caption"].forEach(function(b){var e=this[b],g=this.options[b],f=g.verticalAlign||"top";b="title"===b?"top"===f?-3:0:"top"===f?a[0]+2:0;var k;if(e){this.styledMode||(k=g.style&&g.style.fontSize);k=c.fontMetrics(k,e).b;e.css({width:(g.width||d.width+(g.widthAdjust||0))+"px"});var h=Math.round(e.getBBox(g.useHTML).height);e.align(M({y:"bottom"===f?k:b+k,height:h},g),!1,"spacingBox");g.floating||("top"===f?a[0]=Math.ceil(a[0]+h):"bottom"===f&&(a[2]=Math.ceil(a[2]+
|
||||
h)))}},this);a[0]&&"top"===(this.options.title.verticalAlign||"top")&&(a[0]+=this.options.title.margin);a[2]&&"bottom"===this.options.caption.verticalAlign&&(a[2]+=this.options.caption.margin);var e=!this.titleOffset||this.titleOffset.join(",")!==a.join(",");this.titleOffset=a;R(this,"afterLayOutTitles");!this.isDirtyBox&&e&&(this.isDirtyBox=this.isDirtyLegend=e,this.hasRendered&&S(b,!0)&&this.isDirtyBox&&this.redraw())};a.prototype.getChartSize=function(){var b=this.options.chart,a=b.width;b=b.height;
|
||||
var c=this.renderTo;W(a)||(this.containerWidth=ea(c,"width"));W(b)||(this.containerHeight=ea(c,"height"));this.chartWidth=Math.max(0,a||this.containerWidth||600);this.chartHeight=Math.max(0,aa(b,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))};a.prototype.temporaryDisplay=function(b){var a=this.renderTo;if(b)for(;a&&a.style;)a.hcOrigStyle&&(O(a,a.hcOrigStyle),delete a.hcOrigStyle),a.hcOrigDetached&&(q.body.removeChild(a),a.hcOrigDetached=!1),a=a.parentNode;else for(;a&&a.style;){q.body.contains(a)||
|
||||
a.parentNode||(a.hcOrigDetached=!0,q.body.appendChild(a));if("none"===ea(a,"display",!1)||a.hcOricDetached)a.hcOrigStyle={display:a.style.display,height:a.style.height,overflow:a.style.overflow},b={display:"block",overflow:"hidden"},a!==this.renderTo&&(b.height=0),O(a,b),a.offsetWidth||a.style.setProperty("display","block","important");a=a.parentNode;if(a===q.body)break}};a.prototype.setClassName=function(b){this.container.className="highcharts-container "+(b||"")};a.prototype.getContainer=function(){var b=
|
||||
this.options,a=b.chart,d=ka(),g,f=this.renderTo;f||(this.renderTo=f=a.renderTo);U(f)&&(this.renderTo=f=q.getElementById(f));f||J(13,!0,this);var k=fa(K(f,"data-highcharts-chart"));T(k)&&A[k]&&A[k].hasRendered&&A[k].destroy();K(f,"data-highcharts-chart",this.index);f.innerHTML=h.emptyHTML;a.skipClone||f.offsetWidth||this.temporaryDisplay();this.getChartSize();k=this.chartWidth;var l=this.chartHeight;O(f,{overflow:"hidden"});this.styledMode||(g=M({position:"relative",overflow:"hidden",width:k+"px",
|
||||
height:l+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},a.style||{}));this.container=d=Q("div",{id:d},g,f);this._cursor=d.style.cursor;this.renderer=new (a.renderer||!c?p.getRendererType(a.renderer):e)(d,k,l,void 0,a.forExport,b.exporting&&b.exporting.allowHTML,this.styledMode);v(void 0,this);this.setClassName(a.className);if(this.styledMode)for(var m in b.defs)this.renderer.definition(b.defs[m]);
|
||||
else this.renderer.setStyle(a.style);this.renderer.chartIndex=this.index;R(this,"afterGetContainer")};a.prototype.getMargins=function(b){var a=this.spacing,c=this.margin,d=this.titleOffset;this.resetMargins();d[0]&&!W(c[0])&&(this.plotTop=Math.max(this.plotTop,d[0]+a[0]));d[2]&&!W(c[2])&&(this.marginBottom=Math.max(this.marginBottom,d[2]+a[2]));this.legend&&this.legend.display&&this.legend.adjustMargins(c,a);R(this,"getMargins");b||this.getAxisMargins()};a.prototype.getAxisMargins=function(){var b=
|
||||
this,a=b.axisOffset=[0,0,0,0],c=b.colorAxis,d=b.margin,e=function(b){b.forEach(function(b){b.visible&&b.getOffset()})};b.hasCartesianSeries?e(b.axes):c&&c.length&&e(c);k.forEach(function(c,e){W(d[e])||(b[c]+=a[e])});b.setChartSize()};a.prototype.reflow=function(b){var a=this,c=a.options.chart,d=a.renderTo,e=W(c.width)&&W(c.height),f=c.width||ea(d,"width");c=c.height||ea(d,"height");d=b?b.target:g;delete a.pointer.chartPosition;if(!e&&!a.isPrinting&&f&&c&&(d===g||d===q)){if(f!==a.containerWidth||c!==
|
||||
a.containerHeight)l.clearTimeout(a.reflowTimeout),a.reflowTimeout=ba(function(){a.container&&a.setSize(void 0,void 0,!1)},b?100:0);a.containerWidth=f;a.containerHeight=c}};a.prototype.setReflow=function(b){var a=this;!1===b||this.unbindReflow?!1===b&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=D(g,"resize",function(b){a.options&&a.reflow(b)}),D(this,"destroy",this.unbindReflow))};a.prototype.setSize=function(b,a,c){var d=this,e=d.renderer;d.isResizing+=1;v(c,d);c=
|
||||
e.globalAnimation;d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;"undefined"!==typeof b&&(d.options.chart.width=b);"undefined"!==typeof a&&(d.options.chart.height=a);d.getChartSize();d.styledMode||(c?t:O)(d.container,{width:d.chartWidth+"px",height:d.chartHeight+"px"},c);d.setChartSize(!0);e.setSize(d.chartWidth,d.chartHeight,c);d.axes.forEach(function(b){b.isDirty=!0;b.setScale()});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(c);d.oldChartHeight=null;R(d,
|
||||
"resize");ba(function(){d&&R(d,"endResize",null,function(){--d.isResizing})},n(c).duration)};a.prototype.setChartSize=function(b){var a=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,g=this.options.chart,f=this.spacing,k=this.clipOffset,h,l,m,n;this.plotLeft=h=Math.round(this.plotLeft);this.plotTop=l=Math.round(this.plotTop);this.plotWidth=m=Math.max(0,Math.round(d-h-this.marginRight));this.plotHeight=n=Math.max(0,Math.round(e-l-this.marginBottom));this.plotSizeX=a?n:m;this.plotSizeY=
|
||||
a?m:n;this.plotBorderWidth=g.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:f[3],y:f[0],width:d-f[3]-f[1],height:e-f[0]-f[2]};this.plotBox=c.plotBox={x:h,y:l,width:m,height:n};a=2*Math.floor(this.plotBorderWidth/2);d=Math.ceil(Math.max(a,k[3])/2);e=Math.ceil(Math.max(a,k[0])/2);this.clipBox={x:d,y:e,width:Math.floor(this.plotSizeX-Math.max(a,k[1])/2-d),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(a,k[2])/2-e))};b||(this.axes.forEach(function(b){b.setAxisSize();b.setAxisTranslation()}),
|
||||
c.alignElements());R(this,"afterSetChartSize",{skipAxes:b})};a.prototype.resetMargins=function(){R(this,"resetMargins");var b=this,a=b.options.chart;["margin","spacing"].forEach(function(c){var d=a[c],e=N(d)?d:[d,d,d,d];["Top","Right","Bottom","Left"].forEach(function(d,g){b[c][g]=S(a[c+d],e[g])})});k.forEach(function(a,c){b[a]=S(b.margin[c],b.spacing[c])});b.axisOffset=[0,0,0,0];b.clipOffset=[0,0,0,0]};a.prototype.drawChartBox=function(){var b=this.options.chart,a=this.renderer,c=this.chartWidth,
|
||||
d=this.chartHeight,e=this.styledMode,g=this.plotBGImage,f=b.backgroundColor,k=b.plotBackgroundColor,h=b.plotBackgroundImage,l=this.plotLeft,m=this.plotTop,n=this.plotWidth,q=this.plotHeight,E=this.plotBox,r=this.clipRect,p=this.clipBox,t=this.chartBackground,N=this.plotBackground,w=this.plotBorder,y,v="animate";t||(this.chartBackground=t=a.rect().addClass("highcharts-background").add(),v="attr");if(e)var A=y=t.strokeWidth();else{A=b.borderWidth||0;y=A+(b.shadow?8:0);f={fill:f||"none"};if(A||t["stroke-width"])f.stroke=
|
||||
b.borderColor,f["stroke-width"]=A;t.attr(f).shadow(b.shadow)}t[v]({x:y/2,y:y/2,width:c-y-A%2,height:d-y-A%2,r:b.borderRadius});v="animate";N||(v="attr",this.plotBackground=N=a.rect().addClass("highcharts-plot-background").add());N[v](E);e||(N.attr({fill:k||"none"}).shadow(b.plotShadow),h&&(g?(h!==g.attr("href")&&g.attr("href",h),g.animate(E)):this.plotBGImage=a.image(h,l,m,n,q).add()));r?r.animate({width:p.width,height:p.height}):this.clipRect=a.clipRect(p);v="animate";w||(v="attr",this.plotBorder=
|
||||
w=a.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());e||w.attr({stroke:b.plotBorderColor,"stroke-width":b.plotBorderWidth||0,fill:"none"});w[v](w.crisp({x:l,y:m,width:n,height:q},-w.strokeWidth()));this.isDirtyBox=!1;R(this,"afterDrawChartBox")};a.prototype.propFromSeries=function(){var b=this,a=b.options.chart,c=b.options.series,d,e,g;["inverted","angular","polar"].forEach(function(f){e=x[a.type||a.defaultSeriesType];g=a[f]||e&&e.prototype[f];for(d=c&&c.length;!g&&d--;)(e=x[c[d].type])&&
|
||||
e.prototype[f]&&(g=!0);b[f]=g})};a.prototype.linkSeries=function(){var b=this,a=b.series;a.forEach(function(b){b.linkedSeries.length=0});a.forEach(function(a){var c=a.options.linkedTo;U(c)&&(c=":previous"===c?b.series[a.index-1]:b.get(c))&&c.linkedParent!==a&&(c.linkedSeries.push(a),a.linkedParent=c,c.enabledDataSorting&&a.setDataSortingOptions(),a.visible=S(a.options.visible,c.options.visible,a.visible))});R(this,"afterLinkSeries")};a.prototype.renderSeries=function(){this.series.forEach(function(b){b.translate();
|
||||
b.render()})};a.prototype.renderLabels=function(){var b=this,a=b.options.labels;a.items&&a.items.forEach(function(c){var d=M(a.style,c.style),e=fa(d.left)+b.plotLeft,g=fa(d.top)+b.plotTop+12;delete d.left;delete d.top;b.renderer.text(c.html,e,g).attr({zIndex:2}).css(d).add()})};a.prototype.render=function(){var b=this.axes,a=this.colorAxis,c=this.renderer,d=this.options,e=function(b){b.forEach(function(b){b.visible&&b.render()})},g=0;this.setTitle();this.legend=new H(this,d.legend);this.getStacks&&
|
||||
this.getStacks();this.getMargins(!0);this.setChartSize();d=this.plotWidth;b.some(function(b){if(b.horiz&&b.visible&&b.options.labels.enabled&&b.series.length)return g=21,!0});var f=this.plotHeight=Math.max(this.plotHeight-g,0);b.forEach(function(b){b.setScale()});this.getAxisMargins();var k=1.1<d/this.plotWidth,h=1.05<f/this.plotHeight;if(k||h)b.forEach(function(b){(b.horiz&&k||!b.horiz&&h)&&b.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries?e(b):a&&a.length&&e(a);
|
||||
this.seriesGroup||(this.seriesGroup=c.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0};a.prototype.addCredits=function(b){var a=this,c=V(!0,this.options.credits,b);c.enabled&&!this.credits&&(this.credits=this.renderer.text(c.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){c.href&&(g.location.href=c.href)}).attr({align:c.position.align,zIndex:8}),a.styledMode||
|
||||
this.credits.css(c.style),this.credits.add().align(c.position),this.credits.update=function(b){a.credits=a.credits.destroy();a.addCredits(b)})};a.prototype.destroy=function(){var b=this,a=b.axes,c=b.series,d=b.container,e=d&&d.parentNode,g;R(b,"destroy");b.renderer.forExport?L(A,b):A[b.index]=void 0;u.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");ia(b);for(g=a.length;g--;)a[g]=a[g].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(g=c.length;g--;)c[g]=
|
||||
c[g].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(a){var c=b[a];c&&c.destroy&&(b[a]=c.destroy())});d&&(d.innerHTML=h.emptyHTML,ia(d),e&&Z(d));X(b,function(a,c){delete b[c]})};a.prototype.firstRender=function(){var b=this,a=b.options;if(!b.isReadyToRender||b.isReadyToRender()){b.getContainer();b.resetMargins();b.setChartSize();b.propFromSeries();
|
||||
b.getAxes();(E(a.series)?a.series:[]).forEach(function(a){b.initSeries(a)});b.linkSeries();b.setSeriesData();R(b,"beforeRender");z&&(I.isRequired()?b.pointer=new I(b,a):b.pointer=new z(b,a));b.render();b.pointer.getChartPosition();if(!b.renderer.imgCount&&!b.hasLoaded)b.onload();b.temporaryDisplay(!0)}};a.prototype.onload=function(){this.callbacks.concat([this.callback]).forEach(function(b){b&&"undefined"!==typeof this.index&&b.apply(this,[this])},this);R(this,"load");R(this,"render");W(this.index)&&
|
||||
this.setReflow(this.options.chart.reflow);this.hasLoaded=!0};a.prototype.addSeries=function(b,a,c){var d=this,e;b&&(a=S(a,!0),R(d,"addSeries",{options:b},function(){e=d.initSeries(b);d.isDirtyLegend=!0;d.linkSeries();e.enabledDataSorting&&e.setData(b.data,!1);R(d,"afterAddSeries",{series:e});a&&d.redraw(c)}));return e};a.prototype.addAxis=function(b,a,c,d){return this.createAxis(a?"xAxis":"yAxis",{axis:b,redraw:c,animation:d})};a.prototype.addColorAxis=function(b,a,c){return this.createAxis("colorAxis",
|
||||
{axis:b,redraw:a,animation:c})};a.prototype.createAxis=function(b,a){b=new f(this,V(a.axis,{index:this[b].length,isX:"xAxis"===b}));S(a.redraw,!0)&&this.redraw(a.animation);return b};a.prototype.showLoading=function(b){var a=this,c=a.options,d=c.loading,e=function(){g&&O(g,{left:a.plotLeft+"px",top:a.plotTop+"px",width:a.plotWidth+"px",height:a.plotHeight+"px"})},g=a.loadingDiv,f=a.loadingSpan;g||(a.loadingDiv=g=Q("div",{className:"highcharts-loading highcharts-loading-hidden"},null,a.container));
|
||||
f||(a.loadingSpan=f=Q("span",{className:"highcharts-loading-inner"},null,g),D(a,"redraw",e));g.className="highcharts-loading";h.setElementHTML(f,S(b,c.lang.loading,""));a.styledMode||(O(g,M(d.style,{zIndex:10})),O(f,d.labelStyle),a.loadingShown||(O(g,{opacity:0,display:""}),t(g,{opacity:d.style.opacity||.5},{duration:d.showDuration||0})));a.loadingShown=!0;e()};a.prototype.hideLoading=function(){var b=this.options,a=this.loadingDiv;a&&(a.className="highcharts-loading highcharts-loading-hidden",this.styledMode||
|
||||
t(a,{opacity:0},{duration:b.loading.hideDuration||100,complete:function(){O(a,{display:"none"})}}));this.loadingShown=!1};a.prototype.update=function(b,a,c,e){var g=this,f={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},k=b.isResponsiveOptions,h=[],l,m;R(g,"update",{options:b});k||g.setResponsive(!1,!0);b=F(b,g.options);g.userOptions=V(g.userOptions,b);var n=b.chart;if(n){V(!0,g.options.chart,n);"className"in n&&g.setClassName(n.className);"reflow"in n&&g.setReflow(n.reflow);
|
||||
if("inverted"in n||"polar"in n||"type"in n){g.propFromSeries();var q=!0}"alignTicks"in n&&(q=!0);"events"in n&&y(this,n);X(n,function(b,a){-1!==g.propsRequireUpdateSeries.indexOf("chart."+a)&&(l=!0);-1!==g.propsRequireDirtyBox.indexOf(a)&&(g.isDirtyBox=!0);-1!==g.propsRequireReflow.indexOf(a)&&(k?g.isDirtyBox=!0:m=!0)});!g.styledMode&&n.style&&g.renderer.setStyle(g.options.chart.style||{})}!g.styledMode&&b.colors&&(this.options.colors=b.colors);b.time&&(this.time===r&&(this.time=new d(b.time)),V(!0,
|
||||
g.options.time,b.time));X(b,function(a,c){if(g[c]&&"function"===typeof g[c].update)g[c].update(a,!1);else if("function"===typeof g[f[c]])g[f[c]](a);else"colors"!==c&&-1===g.collectionsWithUpdate.indexOf(c)&&V(!0,g.options[c],b[c]);"chart"!==c&&-1!==g.propsRequireUpdateSeries.indexOf(c)&&(l=!0)});this.collectionsWithUpdate.forEach(function(a){if(b[a]){var d=[];g[a].forEach(function(b,a){b.options.isInternal||d.push(S(b.options.index,a))});ha(b[a]).forEach(function(b,e){var f=W(b.id),k;f&&(k=g.get(b.id));
|
||||
!k&&g[a]&&(k=g[a][d?d[e]:e])&&f&&W(k.options.id)&&(k=void 0);k&&k.coll===a&&(k.update(b,!1),c&&(k.touched=!0));!k&&c&&g.collectionsWithInit[a]&&(g.collectionsWithInit[a][0].apply(g,[b].concat(g.collectionsWithInit[a][1]||[]).concat([!1])).touched=!0)});c&&g[a].forEach(function(b){b.touched||b.options.isInternal?delete b.touched:h.push(b)})}});h.forEach(function(b){b.chart&&b.remove&&b.remove(!1)});q&&g.axes.forEach(function(b){b.update({},!1)});l&&g.getSeriesOrderByLinks().forEach(function(b){b.chart&&
|
||||
b.update({},!1)},this);q=n&&n.width;n=n&&(U(n.height)?aa(n.height,q||g.chartWidth):n.height);m||T(q)&&q!==g.chartWidth||T(n)&&n!==g.chartHeight?g.setSize(q,n,e):S(a,!0)&&g.redraw(e);R(g,"afterUpdate",{options:b,redraw:a,animation:e})};a.prototype.setSubtitle=function(b,a){this.applyDescription("subtitle",b);this.layOutTitles(a)};a.prototype.setCaption=function(b,a){this.applyDescription("caption",b);this.layOutTitles(a)};a.prototype.showResetZoom=function(){function a(){c.zoomOut()}var c=this,d=b.lang,
|
||||
e=c.options.chart.resetZoomButton,g=e.theme,f=g.states,k="chart"===e.relativeTo||"spacingBox"===e.relativeTo?null:"scrollablePlotBox";R(this,"beforeShowResetZoom",null,function(){c.resetZoomButton=c.renderer.button(d.resetZoom,null,null,a,g,f&&f.hover).attr({align:e.position.align,title:d.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(e.position,!1,k)});R(this,"afterShowResetZoom")};a.prototype.zoomOut=function(){R(this,"selection",{resetSelection:!0},this.zoom)};a.prototype.zoom=
|
||||
function(b){var a=this,c=a.pointer,d=a.inverted?c.mouseDownX:c.mouseDownY,e=!1,g;!b||b.resetSelection?(a.axes.forEach(function(b){g=b.zoom()}),c.initiated=!1):b.xAxis.concat(b.yAxis).forEach(function(b){var f=b.axis,k=a.inverted?f.left:f.top,h=a.inverted?k+f.width:k+f.height,l=f.isXAxis,n=!1;if(!l&&d>=k&&d<=h||l||!W(d))n=!0;c[l?"zoomX":"zoomY"]&&n&&(g=f.zoom(b.min,b.max),f.displayBtn&&(e=!0))});var f=a.resetZoomButton;e&&!f?a.showResetZoom():!e&&N(f)&&(a.resetZoomButton=f.destroy());g&&a.redraw(S(a.options.chart.animation,
|
||||
b&&b.animation,100>a.pointCount))};a.prototype.pan=function(b,a){var c=this,d=c.hoverPoints;a="object"===typeof a?a:{enabled:a,type:"x"};var e=c.options.chart,g=c.options.mapNavigation&&c.options.mapNavigation.enabled;e&&e.panning&&(e.panning=a);var f=a.type,k;R(this,"pan",{originalEvent:b},function(){d&&d.forEach(function(b){b.setState()});var a=c.xAxis;"xy"===f?a=a.concat(c.yAxis):"y"===f&&(a=c.yAxis);var e={};a.forEach(function(a){if(a.options.panningEnabled&&!a.options.isInternal){var d=a.horiz,
|
||||
h=b[d?"chartX":"chartY"];d=d?"mouseDownX":"mouseDownY";var l=c[d],n=a.minPointOffset||0,m=a.reversed&&!c.inverted||!a.reversed&&c.inverted?-1:1,q=a.getExtremes(),E=a.toValue(l-h,!0)+n*m,r=a.toValue(l+a.len-h,!0)-(n*m||a.isXAxis&&a.pointRangePadding||0),p=r<E;m=a.hasVerticalPanning();l=p?r:E;E=p?E:r;var t=a.panningState;!m||a.isXAxis||t&&!t.isDirty||a.series.forEach(function(b){var a=b.getProcessedData(!0);a=b.getExtremes(a.yData,!0);t||(t={startMin:Number.MAX_VALUE,startMax:-Number.MAX_VALUE});T(a.dataMin)&&
|
||||
T(a.dataMax)&&(t.startMin=Math.min(S(b.options.threshold,Infinity),a.dataMin,t.startMin),t.startMax=Math.max(S(b.options.threshold,-Infinity),a.dataMax,t.startMax))});m=Math.min(S(t&&t.startMin,q.dataMin),n?q.min:a.toValue(a.toPixels(q.min)-a.minPixelPadding));r=Math.max(S(t&&t.startMax,q.dataMax),n?q.max:a.toValue(a.toPixels(q.max)+a.minPixelPadding));a.panningState=t;a.isOrdinal||(n=m-l,0<n&&(E+=n,l=m),n=E-r,0<n&&(E=r,l-=n),a.series.length&&l!==q.min&&E!==q.max&&l>=m&&E<=r&&(a.setExtremes(l,E,!1,
|
||||
!1,{trigger:"pan"}),c.resetZoomButton||g||l===m||E===r||!f.match("y")||(c.showResetZoom(),a.displayBtn=!1),k=!0),e[d]=h)}});X(e,function(b,a){c[a]=b});k&&c.redraw(!1);O(c.container,{cursor:"move"})})};return a}();M(a.prototype,{callbacks:[],collectionsWithInit:{xAxis:[a.prototype.addAxis,[!0]],yAxis:[a.prototype.addAxis,[!1]],series:[a.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
|
||||
propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")});"";return a});M(f,"Core/Legend/LegendSymbol.js",[f["Core/Utilities.js"]],function(a){var f=a.merge,C=a.pick,G;(function(a){a.drawLineMarker=function(a){var u=this.options,B=a.symbolWidth,z=a.symbolHeight,p=z/2,m=this.chart.renderer,
|
||||
e=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);var d={},l=u.marker;this.chart.styledMode||(d={"stroke-width":u.lineWidth||0},u.dashStyle&&(d.dashstyle=u.dashStyle));this.legendLine=m.path([["M",0,a],["L",B,a]]).addClass("highcharts-graph").attr(d).add(e);l&&!1!==l.enabled&&B&&(u=Math.min(C(l.radius,p),p),0===this.symbol.indexOf("url")&&(l=f(l,{width:z,height:z}),u=0),this.legendSymbol=B=m.symbol(this.symbol,B/2-u,a-u,2*u,2*u,l).addClass("highcharts-point").add(e),B.isMarker=!0)};a.drawRectangle=
|
||||
function(a,f){var u=a.symbolHeight,z=a.options.squareSymbol;f.legendSymbol=this.chart.renderer.rect(z?(a.symbolWidth-u)/2:0,a.baseline-u+1,z?u:a.symbolWidth,u,C(a.options.symbolRadius,u/2)).addClass("highcharts-point").attr({zIndex:3}).add(f.legendGroup)}})(G||(G={}));return G});M(f,"Core/Series/SeriesDefaults.js",[],function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},
|
||||
hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",defer:!0,formatter:function(){var a=this.series.chart.numberFormatter;return"number"!==typeof this.y?"":a(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},
|
||||
hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"}});M(f,"Core/Series/Series.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/DefaultOptions.js"],f["Core/Foundation.js"],f["Core/Globals.js"],f["Core/Legend/LegendSymbol.js"],f["Core/Series/Point.js"],f["Core/Series/SeriesDefaults.js"],f["Core/Series/SeriesRegistry.js"],f["Core/Renderer/SVG/SVGElement.js"],
|
||||
f["Core/Utilities.js"]],function(a,f,C,G,u,H,I,B,z,p){var m=a.animObject,e=a.setAnimation,d=f.defaultOptions,l=C.registerEventOptions,h=G.hasTouch,t=G.svg,n=G.win,v=B.seriesTypes,w=p.addEvent,y=p.arrayMax,A=p.arrayMin,q=p.clamp,k=p.cleanRecursively,c=p.correctFloat,g=p.defined,b=p.erase,r=p.error,x=p.extend,D=p.find,K=p.fireEvent,F=p.getNestedProperty,Q=p.isArray,O=p.isNumber,W=p.isString,Z=p.merge,L=p.objectEach,J=p.pick,M=p.removeEvent,da=p.splat,R=p.syncTimeout;a=function(){function a(){this.zones=
|
||||
this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}a.prototype.init=function(a,b){K(this,"init",{options:b});var c=this,d=a.series;this.eventsToUnbind=[];c.chart=a;c.options=c.setOptions(b);b=c.options;c.linkedSeries=[];c.bindAxes();x(c,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});l(this,b);var e=
|
||||
b.events;if(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();c.parallelArrays.forEach(function(a){c[a+"Data"]||(c[a+"Data"]=[])});c.isCartesian&&(a.hasCartesianSeries=!0);var g;d.length&&(g=d[d.length-1]);c._i=J(g&&g._i,-1)+1;c.opacity=c.options.opacity;a.orderSeries(this.insert(d));b.dataSorting&&b.dataSorting.enabled?c.setDataSortingOptions():c.points||c.data||c.setData(b.data,!1);K(this,"afterInit")};a.prototype.is=function(a){return v[a]&&
|
||||
this instanceof v[a]};a.prototype.insert=function(a){var b=this.options.index,c;if(O(b)){for(c=a.length;c--;)if(b>=J(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return J(c,a.length-1)};a.prototype.bindAxes=function(){var a=this,b=a.options,c=a.chart,d;K(this,"bindAxes",null,function(){(a.axisTypes||[]).forEach(function(e){var g=0;c[e].forEach(function(c){d=c.options;if(b[e]===g&&!d.isInternal||"undefined"!==typeof b[e]&&b[e]===d.id||"undefined"===
|
||||
typeof b[e]&&0===d.index)a.insert(c.series),a[e]=c,c.isDirty=!0;d.isInternal||g++});a[e]||a.optionalAxis===e||r(18,!0,c)})});K(this,"afterBindAxes")};a.prototype.updateParallelArrays=function(a,b){var c=a.series,d=arguments,e=O(b)?function(d){var e="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=e}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))};c.parallelArrays.forEach(e)};a.prototype.hasData=function(){return this.visible&&"undefined"!==typeof this.dataMax&&
|
||||
"undefined"!==typeof this.dataMin||this.visible&&this.yData&&0<this.yData.length};a.prototype.autoIncrement=function(a){var b=this.options,c=b.pointIntervalUnit,d=b.relativeXValue,e=this.chart.time,g=this.xIncrement,f;g=J(g,b.pointStart,0);this.pointInterval=f=J(this.pointInterval,b.pointInterval,1);d&&O(a)&&(f*=a);c&&(b=new e.Date(g),"day"===c?e.set("Date",b,e.get("Date",b)+f):"month"===c?e.set("Month",b,e.get("Month",b)+f):"year"===c&&e.set("FullYear",b,e.get("FullYear",b)+f),f=b.getTime()-g);if(d&&
|
||||
O(a))return g+f;this.xIncrement=g+f;return g};a.prototype.setDataSortingOptions=function(){var a=this.options;x(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1});g(a.pointRange)||(a.pointRange=1)};a.prototype.setOptions=function(a){var b=this.chart,c=b.options,e=c.plotOptions,f=b.userOptions||{};a=Z(a);b=b.styledMode;var k={plotOptions:e,userOptions:a};K(this,"setOptions",k);var h=k.plotOptions[this.type],l=f.plotOptions||{};this.userOptions=k.userOptions;f=Z(h,e.series,f.plotOptions&&
|
||||
f.plotOptions[this.type],a);this.tooltipOptions=Z(d.tooltip,d.plotOptions.series&&d.plotOptions.series.tooltip,d.plotOptions[this.type].tooltip,c.tooltip.userOptions,e.series&&e.series.tooltip,e[this.type].tooltip,a.tooltip);this.stickyTracking=J(a.stickyTracking,l[this.type]&&l[this.type].stickyTracking,l.series&&l.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:f.stickyTracking);null===h.marker&&delete f.marker;this.zoneAxis=f.zoneAxis;e=this.zones=(f.zones||[]).slice();
|
||||
!f.negativeColor&&!f.negativeFillColor||f.zones||(c={value:f[this.zoneAxis+"Threshold"]||f.threshold||0,className:"highcharts-negative"},b||(c.color=f.negativeColor,c.fillColor=f.negativeFillColor),e.push(c));e.length&&g(e[e.length-1].value)&&e.push(b?{}:{color:this.color,fillColor:this.fillColor});K(this,"afterSetOptions",{options:f});return f};a.prototype.getName=function(){return J(this.options.name,"Series "+(this.index+1))};a.prototype.getCyclic=function(a,b,c){var d=this.chart,e=this.userOptions,
|
||||
f=a+"Index",k=a+"Counter",h=c?c.length:J(d.options.chart[a+"Count"],d[a+"Count"]);if(!b){var l=J(e[f],e["_"+f]);g(l)||(d.series.length||(d[k]=0),e["_"+f]=l=d[k]%h,d[k]+=1);c&&(b=c[l])}"undefined"!==typeof l&&(this[f]=l);this[a]=b};a.prototype.getColor=function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||d.plotOptions[this.type].color,this.chart.options.colors)};a.prototype.getPointsCollection=function(){return(this.hasGroupedData?
|
||||
this.points:this.data)||[]};a.prototype.getSymbol=function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)};a.prototype.findPointIndex=function(a,b){var c=a.id,d=a.x,e=this.points,g=this.options.dataSorting,f,k;if(c)g=this.chart.get(c),g instanceof H&&(f=g);else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue)if(f=function(b){return!b.touched&&b.index===a.index},g&&g.matchByName?f=function(b){return!b.touched&&b.name===a.name}:this.options.relativeXValue&&
|
||||
(f=function(b){return!b.touched&&b.options.x===a.x}),f=D(e,f),!f)return;if(f){var h=f&&f.index;"undefined"!==typeof h&&(k=!0)}"undefined"===typeof h&&O(d)&&(h=this.xData.indexOf(d,b));-1!==h&&"undefined"!==typeof h&&this.cropped&&(h=h>=this.cropStart?h-this.cropStart:h);!k&&O(h)&&e[h]&&e[h].touched&&(h=void 0);return h};a.prototype.updateData=function(a,b){var c=this.options,d=c.dataSorting,e=this.points,f=[],k=this.requireSorting,h=a.length===e.length,l,n,m,q=!0;this.xIncrement=null;a.forEach(function(a,
|
||||
b){var n=g(a)&&this.pointClass.prototype.optionsToObject.call({series:this},a)||{},q=n.x;if(n.id||O(q)){if(n=this.findPointIndex(n,m),-1===n||"undefined"===typeof n?f.push(a):e[n]&&a!==c.data[n]?(e[n].update(a,!1,null,!1),e[n].touched=!0,k&&(m=n+1)):e[n]&&(e[n].touched=!0),!h||b!==n||d&&d.enabled||this.hasDerivedData)l=!0}else f.push(a)},this);if(l)for(a=e.length;a--;)(n=e[a])&&!n.touched&&n.remove&&n.remove(!1,b);else!h||d&&d.enabled?q=!1:(a.forEach(function(a,b){a!==e[b].y&&e[b].update&&e[b].update(a,
|
||||
!1,null,!1)}),f.length=0);e.forEach(function(a){a&&(a.touched=!1)});if(!q)return!1;f.forEach(function(a){this.addPoint(a,!1,null,null,!1)},this);null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=y(this.xData),this.autoIncrement());return!0};a.prototype.setData=function(a,b,c,d){var e=this,g=e.points,f=g&&g.length||0,k=e.options,h=e.chart,l=k.dataSorting,n=e.xAxis,m=k.turboThreshold,q=this.xData,p=this.yData,E=e.pointArrayMap;E=E&&E.length;var t=k.keys,w,y=0,v=1,A=null;a=a||[];
|
||||
var x=a.length;b=J(b,!0);l&&l.enabled&&(a=this.sortData(a));!1!==d&&x&&f&&!e.cropped&&!e.hasGroupedData&&e.visible&&!e.isSeriesBoosting&&(w=this.updateData(a,c));if(!w){e.xIncrement=null;e.colorCounter=0;this.parallelArrays.forEach(function(a){e[a+"Data"].length=0});if(m&&x>m)if(A=e.getFirstValidPoint(a),O(A))for(c=0;c<x;c++)q[c]=this.autoIncrement(),p[c]=a[c];else if(Q(A))if(E)if(A.length===E)for(c=0;c<x;c++)q[c]=this.autoIncrement(),p[c]=a[c];else for(c=0;c<x;c++)d=a[c],q[c]=d[0],p[c]=d.slice(1,
|
||||
E+1);else if(t&&(y=t.indexOf("x"),v=t.indexOf("y"),y=0<=y?y:0,v=0<=v?v:1),1===A.length&&(v=0),y===v)for(c=0;c<x;c++)q[c]=this.autoIncrement(),p[c]=a[c][v];else for(c=0;c<x;c++)d=a[c],q[c]=d[y],p[c]=d[v];else r(12,!1,h);else for(c=0;c<x;c++)"undefined"!==typeof a[c]&&(d={series:e},e.pointClass.prototype.applyOptions.apply(d,[a[c]]),e.updateParallelArrays(d,c));p&&W(p[0])&&r(14,!0,h);e.data=[];e.options.data=e.userOptions.data=a;for(c=f;c--;)g[c]&&g[c].destroy&&g[c].destroy();n&&(n.minRange=n.userMinRange);
|
||||
e.isDirty=h.isDirtyBox=!0;e.isDirtyData=!!g;c=!1}"point"===k.legendType&&(this.processData(),this.generatePoints());b&&h.redraw(c)};a.prototype.sortData=function(a){var b=this,c=b.options.dataSorting.sortKey||"y",d=function(a,b){return g(b)&&a.pointClass.prototype.optionsToObject.call({series:a},b)||{}};a.forEach(function(c,e){a[e]=d(b,c);a[e].index=e},this);a.concat().sort(function(a,b){a=F(c,a);b=F(c,b);return b<a?-1:b>a?1:0}).forEach(function(a,b){a.x=b},this);b.linkedSeries&&b.linkedSeries.forEach(function(b){var c=
|
||||
b.options,e=c.data;c.dataSorting&&c.dataSorting.enabled||!e||(e.forEach(function(c,g){e[g]=d(b,c);a[g]&&(e[g].x=a[g].x,e[g].index=g)}),b.setData(e,!1))});return a};a.prototype.getProcessedData=function(a){var b=this.xAxis,c=this.options,d=c.cropThreshold,e=a||this.getExtremesFromAll||c.getExtremesFromAll,g=this.isCartesian;a=b&&b.val2lin;c=!(!b||!b.logarithmic);var f=0,k=this.xData,h=this.yData,l=this.requireSorting;var n=!1;var m=k.length;if(b){n=b.getExtremes();var q=n.min;var p=n.max;n=!(!b.categories||
|
||||
b.names.length)}if(g&&this.sorted&&!e&&(!d||m>d||this.forceCrop))if(k[m-1]<q||k[0]>p)k=[],h=[];else if(this.yData&&(k[0]<q||k[m-1]>p)){var E=this.cropData(this.xData,this.yData,q,p);k=E.xData;h=E.yData;f=E.start;E=!0}for(d=k.length||1;--d;)if(b=c?a(k[d])-a(k[d-1]):k[d]-k[d-1],0<b&&("undefined"===typeof t||b<t))var t=b;else 0>b&&l&&!n&&(r(15,!1,this.chart),l=!1);return{xData:k,yData:h,cropped:E,cropStart:f,closestPointRange:t}};a.prototype.processData=function(a){var b=this.xAxis;if(this.isCartesian&&
|
||||
!this.isDirty&&!b.isDirty&&!this.yAxis.isDirty&&!a)return!1;a=this.getProcessedData();this.cropped=a.cropped;this.cropStart=a.cropStart;this.processedXData=a.xData;this.processedYData=a.yData;this.closestPointRange=this.basePointRange=a.closestPointRange;K(this,"afterProcessData")};a.prototype.cropData=function(a,b,c,d,e){var g=a.length,f,k=0,h=g;e=J(e,this.cropShoulder);for(f=0;f<g;f++)if(a[f]>=c){k=Math.max(0,f-e);break}for(c=f;c<g;c++)if(a[c]>d){h=c+e;break}return{xData:a.slice(k,h),yData:b.slice(k,
|
||||
h),start:k,end:h}};a.prototype.generatePoints=function(){var a=this.options,b=this.processedData||a.data,c=this.processedXData,d=this.processedYData,e=this.pointClass,g=c.length,f=this.cropStart||0,k=this.hasGroupedData,h=a.keys,l=[];a=a.dataGrouping&&a.dataGrouping.groupAll?f:0;var n,m,q=this.data;if(!q&&!k){var p=[];p.length=b.length;q=this.data=p}h&&k&&(this.options.keys=!1);for(m=0;m<g;m++){p=f+m;if(k){var r=(new e).init(this,[c[m]].concat(da(d[m])));r.dataGroup=this.groupMap[a+m];r.dataGroup.options&&
|
||||
(r.options=r.dataGroup.options,x(r,r.dataGroup.options),delete r.dataLabels)}else(r=q[p])||"undefined"===typeof b[p]||(q[p]=r=(new e).init(this,b[p],c[m]));r&&(r.index=k?a+m:p,l[m]=r)}this.options.keys=h;if(q&&(g!==(n=q.length)||k))for(m=0;m<n;m++)m!==f||k||(m+=g),q[m]&&(q[m].destroyElements(),q[m].plotX=void 0);this.data=q;this.points=l;K(this,"afterGeneratePoints")};a.prototype.getXExtremes=function(a){return{min:A(a),max:y(a)}};a.prototype.getExtremes=function(a,b){var c=this.xAxis,d=this.yAxis,
|
||||
e=this.processedXData||this.xData,g=[],f=this.requireSorting?this.cropShoulder:0;d=d?d.positiveValuesOnly:!1;var k,h=0,l=0,n=0;a=a||this.stackedYData||this.processedYData||[];var m=a.length;if(c){var q=c.getExtremes();h=q.min;l=q.max}for(k=0;k<m;k++){var r=e[k];q=a[k];var p=(O(q)||Q(q))&&(q.length||0<q||!d);r=b||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!c||(e[k+f]||r)>=h&&(e[k-f]||r)<=l;if(p&&r)if(p=q.length)for(;p--;)O(q[p])&&(g[n++]=q[p]);else g[n++]=q}a={activeYData:g,
|
||||
dataMin:A(g),dataMax:y(g)};K(this,"afterGetExtremes",{dataExtremes:a});return a};a.prototype.applyExtremes=function(){var a=this.getExtremes();this.dataMin=a.dataMin;this.dataMax=a.dataMax;return a};a.prototype.getFirstValidPoint=function(a){for(var b=a.length,c=0,d=null;null===d&&c<b;)d=a[c],c++;return d};a.prototype.translate=function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,d=this.xAxis,e=d.categories,f=this.enabledDataSorting,k=this.yAxis,
|
||||
h=this.points,l=h.length,n=this.pointPlacementToXValue(),m=!!n,r=a.threshold,p=a.startFromThreshold?r:0,t=this.zoneAxis||"y",w,y,v=Number.MAX_VALUE;for(w=0;w<l;w++){var A=h[w],x=A.x,D=void 0,z=void 0,u=A.y,B=A.low,F=b&&k.stacking&&k.stacking.stacks[(this.negStacks&&u<(p?0:r)?"-":"")+this.stackKey];if(k.positiveValuesOnly&&!k.validatePositiveValue(u)||d.positiveValuesOnly&&!d.validatePositiveValue(x))A.isNull=!0;A.plotX=y=c(q(d.translate(x,0,0,0,1,n,"flags"===this.type),-1E5,1E5));if(b&&this.visible&&
|
||||
F&&F[x]){var C=this.getStackIndicator(C,x,this.index);A.isNull||(D=F[x],z=D.points[C.key])}Q(z)&&(B=z[0],u=z[1],B===p&&C.key===F[x].base&&(B=J(O(r)&&r,k.min)),k.positiveValuesOnly&&0>=B&&(B=null),A.total=A.stackTotal=D.total,A.percentage=D.total&&A.y/D.total*100,A.stackY=u,this.irregularWidths||D.setOffset(this.pointXOffset||0,this.barW||0));A.yBottom=g(B)?q(k.translate(B,0,1,0,1),-1E5,1E5):null;this.dataModify&&(u=this.dataModify.modifyValue(u,w));A.plotY=void 0;O(u)&&(D=k.translate(u,!1,!0,!1,!0),
|
||||
"undefined"!==typeof D&&(A.plotY=q(D,-1E5,1E5)));A.isInside=this.isPointInside(A);A.clientX=m?c(d.translate(x,0,0,0,1,n)):y;A.negative=A[t]<(a[t+"Threshold"]||r||0);A.category=J(e&&e[A.x],A.x);if(!A.isNull&&!1!==A.visible){"undefined"!==typeof G&&(v=Math.min(v,Math.abs(y-G)));var G=y}A.zone=this.zones.length?A.getZone():void 0;!A.graphic&&this.group&&f&&(A.isNew=!0)}this.closestPointRangePx=v;K(this,"afterTranslate")};a.prototype.getValidPoints=function(a,b,c){var d=this.chart;return(a||this.points||
|
||||
[]).filter(function(a){return b&&!d.isInsidePlot(a.plotX,a.plotY,{inverted:d.inverted})?!1:!1!==a.visible&&(c||!a.isNull)})};a.prototype.getClipBox=function(){var a=this.chart,b=this.xAxis,c=this.yAxis,d=Z(a.clipBox);b&&b.len!==a.plotSizeX&&(d.width=b.len);c&&c.len!==a.plotSizeY&&(d.height=c.len);return d};a.prototype.getSharedClipKey=function(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0)};a.prototype.setClip=function(){var a=this.chart,b=this.group,c=this.markerGroup,
|
||||
d=a.sharedClips;a=a.renderer;var e=this.getClipBox(),g=this.getSharedClipKey(),f=d[g];f?f.animate(e):d[g]=f=a.clipRect(e);b&&b.clip(!1===this.options.clip?void 0:f);c&&c.clip()};a.prototype.animate=function(a){var b=this.chart,c=this.group,d=this.markerGroup,e=b.inverted,g=m(this.options.animation),f=[this.getSharedClipKey(),g.duration,g.easing,g.defer].join(),k=b.sharedClips[f],h=b.sharedClips[f+"m"];if(a&&c)g=this.getClipBox(),k?k.attr("height",g.height):(g.width=0,e&&(g.x=b.plotHeight),k=b.renderer.clipRect(g),
|
||||
b.sharedClips[f]=k,h=b.renderer.clipRect({x:e?(b.plotSizeX||0)+99:-99,y:e?-b.plotLeft:-b.plotTop,width:99,height:e?b.chartWidth:b.chartHeight}),b.sharedClips[f+"m"]=h),c.clip(k),d&&d.clip(h);else if(k&&!k.hasClass("highcharts-animating")){b=this.getClipBox();var l=g.step;d&&d.element.childNodes.length&&(g.step=function(a,b){l&&l.apply(b,arguments);h&&h.element&&h.attr(b.prop,"width"===b.prop?a+99:a)});k.addClass("highcharts-animating").animate(b,g)}};a.prototype.afterAnimate=function(){var a=this;
|
||||
this.setClip();L(this.chart.sharedClips,function(b,c,d){b&&!a.chart.container.querySelector('[clip-path="url(#'+b.id+')"]')&&(b.destroy(),delete d[c])});this.finishedAnimating=!0;K(this,"afterAnimate")};a.prototype.drawPoints=function(){var a=this.points,b=this.chart,c=this.options.marker,d=this[this.specialGroup]||this.markerGroup,e=this.xAxis,g=J(c.enabled,!e||e.isRadial?!0:null,this.closestPointRangePx>=c.enabledThreshold*c.radius),f,k;if(!1!==c.enabled||this._hasPointMarkers)for(f=0;f<a.length;f++){var h=
|
||||
a[f];var l=(k=h.graphic)?"animate":"attr";var n=h.marker||{};var m=!!h.marker;if((g&&"undefined"===typeof n.enabled||n.enabled)&&!h.isNull&&!1!==h.visible){var q=J(n.symbol,this.symbol,"rect");var r=this.markerAttribs(h,h.selected&&"select");this.enabledDataSorting&&(h.startXPos=e.reversed?-(r.width||0):e.width);var p=!1!==h.isInside;k?k[p?"show":"hide"](p).animate(r):p&&(0<(r.width||0)||h.hasImage)&&(h.graphic=k=b.renderer.symbol(q,r.x,r.y,r.width,r.height,m?n:c).add(d),this.enabledDataSorting&&
|
||||
b.hasRendered&&(k.attr({x:h.startXPos}),l="animate"));k&&"animate"===l&&k[p?"show":"hide"](p).animate(r);if(k&&!b.styledMode)k[l](this.pointAttribs(h,h.selected&&"select"));k&&k.addClass(h.getClassName(),!0)}else k&&(h.graphic=k.destroy())}};a.prototype.markerAttribs=function(a,b){var c=this.options,d=c.marker,e=a.marker||{},g=e.symbol||d.symbol,f=J(e.radius,d&&d.radius);b&&(d=d.states[b],b=e.states&&e.states[b],f=J(b&&b.radius,d&&d.radius,f&&f+(d&&d.radiusPlus||0)));a.hasImage=g&&0===g.indexOf("url");
|
||||
a.hasImage&&(f=0);a=O(f)?{x:c.crisp?Math.floor(a.plotX-f):a.plotX-f,y:a.plotY-f}:{};f&&(a.width=a.height=2*f);return a};a.prototype.pointAttribs=function(a,b){var c=this.options.marker,d=a&&a.options,e=d&&d.marker||{},g=d&&d.color,f=a&&a.color,k=a&&a.zone&&a.zone.color,h=this.color;a=J(e.lineWidth,c.lineWidth);d=1;h=g||k||f||h;g=e.fillColor||c.fillColor||h;f=e.lineColor||c.lineColor||h;b=b||"normal";c=c.states[b]||{};b=e.states&&e.states[b]||{};a=J(b.lineWidth,c.lineWidth,a+J(b.lineWidthPlus,c.lineWidthPlus,
|
||||
0));g=b.fillColor||c.fillColor||g;f=b.lineColor||c.lineColor||f;d=J(b.opacity,c.opacity,d);return{stroke:f,"stroke-width":a,fill:g,opacity:d}};a.prototype.destroy=function(a){var c=this,d=c.chart,e=/AppleWebKit\/533/.test(n.navigator.userAgent),g=c.data||[],f,k,h,l;K(c,"destroy",{keepEventsForUpdate:a});this.removeEvents(a);(c.axisTypes||[]).forEach(function(a){(l=c[a])&&l.series&&(b(l.series,c),l.isDirty=l.forceRedraw=!0)});c.legendItem&&c.chart.legend.destroyItem(c);for(k=g.length;k--;)(h=g[k])&&
|
||||
h.destroy&&h.destroy();c.clips&&c.clips.forEach(function(a){return a.destroy()});p.clearTimeout(c.animationTimeout);L(c,function(a,b){a instanceof z&&!a.survive&&(f=e&&"group"===b?"hide":"destroy",a[f]())});d.hoverSeries===c&&(d.hoverSeries=void 0);b(d.series,c);d.orderSeries();L(c,function(b,d){a&&"hcEvents"===d||delete c[d]})};a.prototype.applyZones=function(){var a=this,b=this.chart,c=b.renderer,d=this.zones,e=this.clips||[],g=this.graph,f=this.area,k=Math.max(b.chartWidth,b.chartHeight),h=this[(this.zoneAxis||
|
||||
"y")+"Axis"],l=b.inverted,n,m,r,p,t,w,A,y,v=!1;if(d.length&&(g||f)&&h&&"undefined"!==typeof h.min){var x=h.reversed;var D=h.horiz;g&&!this.showLine&&g.hide();f&&f.hide();var z=h.getExtremes();d.forEach(function(d,E){n=x?D?b.plotWidth:0:D?0:h.toPixels(z.min)||0;n=q(J(m,n),0,k);m=q(Math.round(h.toPixels(J(d.value,z.max),!0)||0),0,k);v&&(n=m=h.toPixels(z.max));p=Math.abs(n-m);t=Math.min(n,m);w=Math.max(n,m);h.isXAxis?(r={x:l?w:t,y:0,width:p,height:k},D||(r.x=b.plotHeight-r.x)):(r={x:0,y:l?w:t,width:k,
|
||||
height:p},D&&(r.y=b.plotWidth-r.y));l&&c.isVML&&(r=h.isXAxis?{x:0,y:x?t:w,height:r.width,width:b.chartWidth}:{x:r.y-b.plotLeft-b.spacingBox.x,y:0,width:r.height,height:b.chartHeight});e[E]?e[E].animate(r):e[E]=c.clipRect(r);A=a["zone-area-"+E];y=a["zone-graph-"+E];g&&y&&y.clip(e[E]);f&&A&&A.clip(e[E]);v=d.value>z.max;a.resetZones&&0===m&&(m=void 0)});this.clips=e}else a.visible&&(g&&g.show(!0),f&&f.show(!0))};a.prototype.invertGroups=function(a){function b(){["group","markerGroup"].forEach(function(b){c[b]&&
|
||||
(d.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(c.isRadialSeries?!1:a))})}var c=this,d=c.chart;c.xAxis&&(c.eventsToUnbind.push(w(d,"resize",b)),b(),c.invertGroups=b)};a.prototype.plotGroup=function(a,b,c,d,e){var f=this[a],k=!f;c={visibility:c,zIndex:d||.1};"undefined"===typeof this.opacity||this.chart.styledMode||"inactive"===this.state||(c.opacity=this.opacity);k&&(this[a]=f=this.chart.renderer.g().add(e));f.addClass("highcharts-"+
|
||||
b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(g(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(f.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);f.attr(c)[k?"attr":"animate"](this.getPlotBox());return f};a.prototype.getPlotBox=function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}};a.prototype.removeEvents=
|
||||
function(a){a||M(this);this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind.length=0)};a.prototype.render=function(){var a=this,b=a.chart,c=a.options,d=m(c.animation),e=a.visible?"inherit":"hidden",g=c.zIndex,f=a.hasRendered,k=b.seriesGroup,h=b.inverted;b=!a.finishedAnimating&&b.renderer.isSVG?d.duration:0;K(this,"render");var l=a.plotGroup("group","series",e,g,k);a.markerGroup=a.plotGroup("markerGroup","markers",e,g,k);!1!==c.clip&&a.setClip();a.animate&&
|
||||
b&&a.animate(!0);l.inverted=J(a.invertible,a.isCartesian)?h:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.visible&&a.drawPoints();a.drawDataLabels&&a.drawDataLabels();a.redrawPoints&&a.redrawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(h);a.animate&&b&&a.animate();f||(b&&d.defer&&(b+=d.defer),a.animationTimeout=R(function(){a.afterAnimate()},b||0));a.isDirty=!1;a.hasRendered=!0;K(a,"afterRender")};a.prototype.redraw=function(){var a=this.chart,b=this.isDirty||
|
||||
this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:J(d&&d.left,a.plotLeft),translateY:J(e&&e.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree};a.prototype.searchPoint=function(a,b){var c=this.xAxis,d=this.yAxis,e=this.chart.inverted;return this.searchKDTree({clientX:e?c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:e?d.len-a.chartX+d.pos:a.chartY-d.pos},b,a)};a.prototype.buildKDTree=function(a){function b(a,
|
||||
d,e){var g=a&&a.length;if(g){var f=c.kdAxisArray[d%e];a.sort(function(a,b){return a[f]-b[f]});g=Math.floor(g/2);return{point:a[g],left:b(a.slice(0,g),d+1,e),right:b(a.slice(g+1),d+1,e)}}}this.buildingKdTree=!0;var c=this,d=-1<c.options.findNearestPointBy.indexOf("y")?2:1;delete c.kdTree;R(function(){c.kdTree=b(c.getValidPoints(null,!c.directTouch),d,d);c.buildingKdTree=!1},c.options.kdNow||a&&"touchstart"===a.type?0:1)};a.prototype.searchKDTree=function(a,b,c){function d(a,b,c,l){var n=b.point,m=
|
||||
e.kdAxisArray[c%l],q=n,r=g(a[f])&&g(n[f])?Math.pow(a[f]-n[f],2):null;var p=g(a[k])&&g(n[k])?Math.pow(a[k]-n[k],2):null;p=(r||0)+(p||0);n.dist=g(p)?Math.sqrt(p):Number.MAX_VALUE;n.distX=g(r)?Math.sqrt(r):Number.MAX_VALUE;m=a[m]-n[m];p=0>m?"left":"right";r=0>m?"right":"left";b[p]&&(p=d(a,b[p],c+1,l),q=p[h]<q[h]?p:n);b[r]&&Math.sqrt(m*m)<q[h]&&(a=d(a,b[r],c+1,l),q=a[h]<q[h]?a:q);return q}var e=this,f=this.kdAxisArray[0],k=this.kdAxisArray[1],h=b?"distX":"dist";b=-1<e.options.findNearestPointBy.indexOf("y")?
|
||||
2:1;this.kdTree||this.buildingKdTree||this.buildKDTree(c);if(this.kdTree)return d(a,this.kdTree,b,b)};a.prototype.pointPlacementToXValue=function(){var a=this.options,b=a.pointRange,c=this.xAxis;a=a.pointPlacement;"between"===a&&(a=c.reversed?-.5:.5);return O(a)?a*(b||c.pointRange):0};a.prototype.isPointInside=function(a){var b=this.chart,c=this.xAxis,d=this.yAxis;return"undefined"!==typeof a.plotY&&"undefined"!==typeof a.plotX&&0<=a.plotY&&a.plotY<=(d?d.len:b.plotHeight)&&0<=a.plotX&&a.plotX<=(c?
|
||||
c.len:b.plotWidth)};a.prototype.drawTracker=function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=a.chart,g=e.pointer,f=e.renderer,k=e.options.tooltip.snap,l=a.tracker,n=function(b){if(e.hoverSeries!==a)a.onMouseOver()},m="rgba(192,192,192,"+(t?.0001:.002)+")";l?l.attr({d:d}):a.graph&&(a.tracker=f.path(d).attr({visibility:a.visible?"visible":"hidden",zIndex:2}).addClass(c?"highcharts-tracker-area":"highcharts-tracker-line").add(a.group),e.styledMode||a.tracker.attr({"stroke-linecap":"round",
|
||||
"stroke-linejoin":"round",stroke:m,fill:c?m:"none","stroke-width":a.graph.strokeWidth()+(c?0:2*k)}),[a.tracker,a.markerGroup,a.dataLabelsGroup].forEach(function(a){if(a&&(a.addClass("highcharts-tracker").on("mouseover",n).on("mouseout",function(a){g.onTrackerMouseOut(a)}),b.cursor&&!e.styledMode&&a.css({cursor:b.cursor}),h))a.on("touchstart",n)}));K(this,"afterDrawTracker")};a.prototype.addPoint=function(a,b,c,d,e){var g=this.options,f=this.data,k=this.chart,h=this.xAxis;h=h&&h.hasNames&&h.names;
|
||||
var l=g.data,n=this.xData,m;b=J(b,!0);var q={series:this};this.pointClass.prototype.applyOptions.apply(q,[a]);var r=q.x;var p=n.length;if(this.requireSorting&&r<n[p-1])for(m=!0;p&&n[p-1]>r;)p--;this.updateParallelArrays(q,"splice",p,0,0);this.updateParallelArrays(q,p);h&&q.name&&(h[r]=q.name);l.splice(p,0,a);if(m||this.processedData)this.data.splice(p,0,null),this.processData();"point"===g.legendType&&this.generatePoints();c&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(q,
|
||||
"shift"),l.shift()));!1!==e&&K(this,"addPoint",{point:q});this.isDirtyData=this.isDirty=!0;b&&k.redraw(d)};a.prototype.removePoint=function(a,b,c){var d=this,g=d.data,f=g[a],k=d.points,h=d.chart,l=function(){k&&k.length===g.length&&k.splice(a,1);g.splice(a,1);d.options.data.splice(a,1);d.updateParallelArrays(f||{series:d},"splice",a,1);f&&f.destroy();d.isDirty=!0;d.isDirtyData=!0;b&&h.redraw()};e(c,h);b=J(b,!0);f?f.firePointEvent("remove",null,l):l()};a.prototype.remove=function(a,b,c,d){function e(){g.destroy(d);
|
||||
f.isDirtyLegend=f.isDirtyBox=!0;f.linkSeries();J(a,!0)&&f.redraw(b)}var g=this,f=g.chart;!1!==c?K(g,"remove",null,e):e()};a.prototype.update=function(a,b){a=k(a,this.userOptions);K(this,"update",{options:a});var c=this,d=c.chart,e=c.userOptions,g=c.initialType||c.type,f=d.options.plotOptions,h=v[g].prototype,l=c.finishedAnimating&&{animation:!1},n={},m,q=["eventOptions","navigatorSeries","baseSeries"],p=a.type||e.type||d.options.chart.type,t=!(this.hasDerivedData||p&&p!==this.type||"undefined"!==
|
||||
typeof a.pointStart||"undefined"!==typeof a.pointInterval||"undefined"!==typeof a.relativeXValue||a.joinBy||a.mapData||c.hasOptionChanged("dataGrouping")||c.hasOptionChanged("pointStart")||c.hasOptionChanged("pointInterval")||c.hasOptionChanged("pointIntervalUnit")||c.hasOptionChanged("keys"));p=p||g;t&&(q.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels","clips","nodes","layout","level","mapMap","mapData","minY","maxY",
|
||||
"minX","maxX"),!1!==a.visible&&q.push("area","graph"),c.parallelArrays.forEach(function(a){q.push(a+"Data")}),a.data&&(a.dataSorting&&x(c.options.dataSorting,a.dataSorting),this.setData(a.data,!1)));a=Z(e,l,{index:"undefined"===typeof e.index?c.index:e.index,pointStart:J(f&&f.series&&f.series.pointStart,e.pointStart,c.xData[0])},!t&&{data:c.options.data},a);t&&a.data&&(a.data=c.options.data);q=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(q);q.forEach(function(a){q[a]=c[a];delete c[a]});
|
||||
f=!1;if(v[p]){if(f=p!==c.type,c.remove(!1,!1,!1,!0),f)if(Object.setPrototypeOf)Object.setPrototypeOf(c,v[p].prototype);else{l=Object.hasOwnProperty.call(c,"hcEvents")&&c.hcEvents;for(m in h)c[m]=void 0;x(c,v[p].prototype);l?c.hcEvents=l:delete c.hcEvents}}else r(17,!0,d,{missingModuleFor:p});q.forEach(function(a){c[a]=q[a]});c.init(d,a);if(t&&this.points){var w=c.options;!1===w.visible?(n.graphic=1,n.dataLabel=1):c._hasPointLabels||(a=w.marker,h=w.dataLabels,!a||!1!==a.enabled&&(e.marker&&e.marker.symbol)===
|
||||
a.symbol||(n.graphic=1),h&&!1===h.enabled&&(n.dataLabel=1));this.points.forEach(function(a){a&&a.series&&(a.resolveColor(),Object.keys(n).length&&a.destroyElements(n),!1===w.showInLegend&&a.legendItem&&d.legend.destroyItem(a))},this)}c.initialType=g;d.linkSeries();f&&c.linkedSeries.length&&(c.isDirtyData=!0);K(this,"afterUpdate");J(b,!0)&&d.redraw(t?void 0:!1)};a.prototype.setName=function(a){this.name=this.options.name=this.userOptions.name=a;this.chart.isDirtyLegend=!0};a.prototype.hasOptionChanged=
|
||||
function(a){var b=this.options[a],c=this.chart.options.plotOptions,d=this.userOptions[a];return d?b!==d:b!==J(c&&c[this.type]&&c[this.type][a],c&&c.series&&c.series[a],b)};a.prototype.onMouseOver=function(){var a=this.chart,b=a.hoverSeries;a.pointer.setHoverChartIndex();if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&K(this,"mouseOver");this.setState("hover");a.hoverSeries=this};a.prototype.onMouseOut=function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=
|
||||
null;if(d)d.onMouseOut();this&&a.events.mouseOut&&K(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();b.series.forEach(function(a){a.setState("",!0)})};a.prototype.setState=function(a,b){var c=this,d=c.options,e=c.graph,g=d.inactiveOtherPoints,f=d.states,k=J(f[a||"normal"]&&f[a||"normal"].animation,c.chart.options.chart.animation),h=d.lineWidth,l=0,n=d.opacity;a=a||"";if(c.state!==a&&([c.group,c.markerGroup,c.dataLabelsGroup].forEach(function(b){b&&(c.state&&b.removeClass("highcharts-series-"+
|
||||
c.state),a&&b.addClass("highcharts-series-"+a))}),c.state=a,!c.chart.styledMode)){if(f[a]&&!1===f[a].enabled)return;a&&(h=f[a].lineWidth||h+(f[a].lineWidthPlus||0),n=J(f[a].opacity,n));if(e&&!e.dashstyle)for(d={"stroke-width":h},e.animate(d,k);c["zone-graph-"+l];)c["zone-graph-"+l].animate(d,k),l+=1;g||[c.group,c.markerGroup,c.dataLabelsGroup,c.labelBySeries].forEach(function(a){a&&a.animate({opacity:n},k)})}b&&g&&c.points&&c.setAllPointsToState(a||void 0)};a.prototype.setAllPointsToState=function(a){this.points.forEach(function(b){b.setState&&
|
||||
b.setState(a)})};a.prototype.setVisible=function(a,b){var c=this,d=c.chart,e=c.legendItem,g=d.options.chart.ignoreHiddenSeries,f=c.visible,k=(c.visible=a=c.options.visible=c.userOptions.visible="undefined"===typeof a?!f:a)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(a){if(c[a])c[a][k]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&d.series.forEach(function(a){a.options.stacking&&
|
||||
a.visible&&(a.isDirty=!0)});c.linkedSeries.forEach(function(b){b.setVisible(a,!1)});g&&(d.isDirtyBox=!0);K(c,k);!1!==b&&d.redraw()};a.prototype.show=function(){this.setVisible(!0)};a.prototype.hide=function(){this.setVisible(!1)};a.prototype.select=function(a){this.selected=a=this.options.selected="undefined"===typeof a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);K(this,a?"select":"unselect")};a.prototype.shouldShowTooltip=function(a,b,c){void 0===c&&(c={});c.series=this;c.visiblePlotOnly=
|
||||
!0;return this.chart.isInsidePlot(a,b,c)};a.defaultOptions=I;return a}();x(a.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,drawLegendSymbol:u.drawLineMarker,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:H,requireSorting:!0,sorted:!0});B.series=a;"";"";return a});M(f,"Extensions/ScrollablePlotArea.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/Axis/Axis.js"],f["Core/Chart/Chart.js"],f["Core/Series/Series.js"],
|
||||
f["Core/Renderer/RendererRegistry.js"],f["Core/Utilities.js"]],function(a,f,C,G,u,H){var F=a.stop,B=H.addEvent,z=H.createElement,p=H.merge,m=H.pick;B(C,"afterSetChartSize",function(a){var d=this.options.chart.scrollablePlotArea,e=d&&d.minWidth;d=d&&d.minHeight;if(!this.renderer.forExport){if(e){if(this.scrollablePixelsX=e=Math.max(0,e-this.chartWidth)){this.scrollablePlotBox=this.renderer.scrollablePlotBox=p(this.plotBox);this.plotBox.width=this.plotWidth+=e;this.inverted?this.clipBox.height+=e:this.clipBox.width+=
|
||||
e;var h={1:{name:"right",value:e}}}}else d&&(this.scrollablePixelsY=e=Math.max(0,d-this.chartHeight))&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=p(this.plotBox),this.plotBox.height=this.plotHeight+=e,this.inverted?this.clipBox.width+=e:this.clipBox.height+=e,h={2:{name:"bottom",value:e}});h&&!a.skipAxes&&this.axes.forEach(function(a){h[a.side]?a.getPlotLinePath=function(){var d=h[a.side].name,e=this[d];this[d]=e-h[a.side].value;var l=f.prototype.getPlotLinePath.apply(this,arguments);
|
||||
this[d]=e;return l}:(a.setAxisSize(),a.setAxisTranslation())})}});B(C,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()});C.prototype.setUpScrolling=function(){var a=this,d={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(d.overflowX="auto");this.scrollablePixelsY&&(d.overflowY="auto");this.scrollingParent=z("div",{className:"highcharts-scrolling-parent"},
|
||||
{position:"relative"},this.renderTo);this.scrollingContainer=z("div",{className:"highcharts-scrolling"},d,this.scrollingParent);B(this.scrollingContainer,"scroll",function(){a.pointer&&delete a.pointer.chartPosition});this.innerContainer=z("div",{className:"highcharts-inner-container"},null,this.scrollingContainer);this.innerContainer.appendChild(this.container);this.setUpScrolling=null};C.prototype.moveFixedElements=function(){var a=this.container,d=this.fixedRenderer,f=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "),
|
||||
h;this.scrollablePixelsX&&!this.inverted?h=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted?h=".highcharts-xaxis":this.scrollablePixelsY&&!this.inverted?h=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(h=".highcharts-yaxis");h&&f.push(h+":not(.highcharts-radial-axis)",h+"-labels:not(.highcharts-radial-axis-labels)");f.forEach(function(e){[].forEach.call(a.querySelectorAll(e),function(a){(a.namespaceURI===d.SVG_NS?d.box:d.box.parentNode).appendChild(a);a.style.pointerEvents="auto"})})};
|
||||
C.prototype.applyFixed=function(){var a=!this.fixedDiv,d=this.options.chart,f=d.scrollablePlotArea,h=u.getRendererType();a?(this.fixedDiv=z("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(d.style&&d.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=d=new h(this.fixedDiv,this.chartWidth,this.chartHeight,
|
||||
this.options.chart.style),this.scrollableMask=d.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":m(f.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),B(this,"afterShowResetZoom",this.moveFixedElements),B(this,"afterApplyDrilldown",this.moveFixedElements),B(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight);if(this.scrollableDirty||a)this.scrollableDirty=!1,this.moveFixedElements();d=this.chartWidth+
|
||||
(this.scrollablePixelsX||0);h=this.chartHeight+(this.scrollablePixelsY||0);F(this.container);this.container.style.width=d+"px";this.container.style.height=h+"px";this.renderer.boxWrapper.attr({width:d,height:h,viewBox:[0,0,d,h].join(" ")});this.chartBackground.attr({width:d,height:h});this.scrollingContainer.style.height=this.chartHeight+"px";a&&(f.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*f.scrollPositionX),f.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*
|
||||
f.scrollPositionY));h=this.axisOffset;a=this.plotTop-h[0]-1;f=this.plotLeft-h[3]-1;d=this.plotTop+this.plotHeight+h[2]+1;h=this.plotLeft+this.plotWidth+h[1]+1;var p=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),n=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);a=this.scrollablePixelsX?[["M",0,a],["L",this.plotLeft-1,a],["L",this.plotLeft-1,d],["L",0,d],["Z"],["M",p,a],["L",this.chartWidth,a],["L",this.chartWidth,d],["L",p,d],["Z"]]:this.scrollablePixelsY?[["M",f,0],["L",f,this.plotTop-
|
||||
1],["L",h,this.plotTop-1],["L",h,0],["Z"],["M",f,n],["L",f,this.chartHeight],["L",h,this.chartHeight],["L",h,n],["Z"]]:[["M",0,0]];"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:a})};B(f,"afterInit",function(){this.chart.scrollableDirty=!0});B(G,"show",function(){this.chart.scrollableDirty=!0});""});M(f,"Core/Axis/StackingAxis.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/Axis/Axis.js"],f["Core/Utilities.js"]],function(a,f,C){var F=a.getDeferredAnimation,u=C.addEvent,H=
|
||||
C.destroyObjectProperties,I=C.fireEvent,B=C.isNumber,z=C.objectEach,p;(function(a){function e(){var a=this.stacking;if(a){var d=a.stacks;z(d,function(a,e){H(a);d[e]=null});a&&a.stackTotalGroup&&a.stackTotalGroup.destroy()}}function d(){this.stacking||(this.stacking=new h(this))}var f=[];a.compose=function(a){-1===f.indexOf(a)&&(f.push(a),u(a,"init",d),u(a,"destroy",e));return a};var h=function(){function a(a){this.oldStacks={};this.stacks={};this.stacksTouched=0;this.axis=a}a.prototype.buildStacks=
|
||||
function(){var a=this.axis,d=a.series,e=a.options.reversedStacks,f=d.length,h;if(!a.isXAxis){this.usePercentage=!1;for(h=f;h--;){var l=d[e?h:f-h-1];l.setStackedPoints();l.setGroupedPoints()}for(h=0;h<f;h++)d[h].modifyStacks();I(a,"afterBuildStacks")}};a.prototype.cleanStacks=function(){if(!this.axis.isXAxis){if(this.oldStacks)var a=this.stacks=this.oldStacks;z(a,function(a){z(a,function(a){a.cumulative=a.total})})}};a.prototype.resetStacks=function(){var a=this,d=a.stacks;a.axis.isXAxis||z(d,function(d){z(d,
|
||||
function(e,f){B(e.touched)&&e.touched<a.stacksTouched?(e.destroy(),delete d[f]):(e.total=null,e.cumulative=null)})})};a.prototype.renderStackTotals=function(){var a=this.axis,d=a.chart,e=d.renderer,f=this.stacks;a=F(d,a.options.stackLabels&&a.options.stackLabels.animation||!1);var h=this.stackTotalGroup=this.stackTotalGroup||e.g("stack-labels").attr({visibility:"visible",zIndex:6,opacity:0}).add();h.translate(d.plotLeft,d.plotTop);z(f,function(a){z(a,function(a){a.render(h)})});h.animate({opacity:1},
|
||||
a)};return a}();a.Additions=h})(p||(p={}));return p});M(f,"Extensions/Stacking.js",[f["Core/Axis/Axis.js"],f["Core/Chart/Chart.js"],f["Core/FormatUtilities.js"],f["Core/Globals.js"],f["Core/Series/Series.js"],f["Core/Axis/StackingAxis.js"],f["Core/Utilities.js"]],function(a,f,C,G,u,H,I){var B=C.format,z=I.correctFloat,p=I.defined,m=I.destroyObjectProperties,e=I.isArray,d=I.isNumber,l=I.objectEach,h=I.pick,t=function(){function a(a,d,e,f,h){var k=a.chart.inverted;this.axis=a;this.isNegative=e;this.options=
|
||||
d=d||{};this.x=f;this.total=null;this.points={};this.hasValidPoints=!1;this.stack=h;this.rightCliff=this.leftCliff=0;this.alignOptions={align:d.align||(k?e?"left":"right":"center"),verticalAlign:d.verticalAlign||(k?"middle":e?"bottom":"top"),y:d.y,x:d.x};this.textAlign=d.textAlign||(k?e?"right":"left":"center")}a.prototype.destroy=function(){m(this,this.axis)};a.prototype.render=function(a){var d=this.axis.chart,e=this.options,f=e.format;f=f?B(f,this,d):e.formatter.call(this);this.label?this.label.attr({text:f,
|
||||
visibility:"hidden"}):(this.label=d.renderer.label(f,null,null,e.shape,null,null,e.useHTML,!1,"stack-labels"),f={r:e.borderRadius||0,text:f,rotation:e.rotation,padding:h(e.padding,5),visibility:"hidden"},d.styledMode||(f.fill=e.backgroundColor,f.stroke=e.borderColor,f["stroke-width"]=e.borderWidth,this.label.css(e.style)),this.label.attr(f),this.label.added||this.label.add(a));this.label.labelrank=d.plotSizeY};a.prototype.setOffset=function(a,e,f,l,m){var k=this.axis,c=k.chart;l=k.translate(k.stacking.usePercentage?
|
||||
100:l?l:this.total,0,0,0,1);f=k.translate(f?f:0);f=p(l)&&Math.abs(l-f);a=h(m,c.xAxis[0].translate(this.x))+a;k=p(l)&&this.getStackBox(c,this,a,l,e,f,k);e=this.label;f=this.isNegative;a="justify"===h(this.options.overflow,"justify");var g=this.textAlign;e&&k&&(m=e.getBBox(),l=e.padding,g="left"===g?c.inverted?-l:l:"right"===g?m.width:c.inverted&&"center"===g?m.width/2:c.inverted?f?m.width+l:-l:m.width/2,f=c.inverted?m.height/2:f?-l:m.height,this.alignOptions.x=h(this.options.x,0),this.alignOptions.y=
|
||||
h(this.options.y,0),k.x-=g,k.y-=f,e.align(this.alignOptions,null,k),c.isInsidePlot(e.alignAttr.x+g-this.alignOptions.x,e.alignAttr.y+f-this.alignOptions.y)?e.show():(e.alignAttr.y=-9999,a=!1),a&&u.prototype.justifyDataLabel.call(this.axis,e,this.alignOptions,e.alignAttr,m,k),e.attr({x:e.alignAttr.x,y:e.alignAttr.y}),h(!a&&this.options.crop,!0)&&((c=d(e.x)&&d(e.y)&&c.isInsidePlot(e.x-l+e.width,e.y)&&c.isInsidePlot(e.x+l,e.y))||e.hide()))};a.prototype.getStackBox=function(a,d,e,f,h,k,c){var g=d.axis.reversed,
|
||||
b=a.inverted,l=c.height+c.pos-(b?a.plotLeft:a.plotTop);d=d.isNegative&&!g||!d.isNegative&&g;return{x:b?d?f-c.right:f-k+c.pos-a.plotLeft:e+a.xAxis[0].transB-a.plotLeft,y:b?c.height-e-h:d?l-f-k:l-f,width:b?k:h,height:b?h:k}};return a}();f.prototype.getStacks=function(){var a=this,d=a.inverted;a.yAxis.forEach(function(a){a.stacking&&a.stacking.stacks&&a.hasVisibleSeries&&(a.stacking.oldStacks=a.stacking.stacks)});a.series.forEach(function(e){var f=e.xAxis&&e.xAxis.options||{};!e.options.stacking||!0!==
|
||||
e.visible&&!1!==a.options.chart.ignoreHiddenSeries||(e.stackKey=[e.type,h(e.options.stack,""),d?f.top:f.left,d?f.height:f.width].join())})};H.compose(a);u.prototype.setGroupedPoints=function(){var a=this.yAxis.stacking;this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&1<this.chart.series.length?u.prototype.setStackedPoints.call(this,"group"):a&&l(a.stacks,function(d,e){"group"===e.slice(-5)&&(l(d,function(a){return a.destroy()}),delete a.stacks[e])})};
|
||||
u.prototype.setStackedPoints=function(a){var d=a||this.options.stacking;if(d&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var f=this.processedXData,l=this.processedYData,m=[],n=l.length,k=this.options,c=k.threshold,g=h(k.startFromThreshold&&c,0);k=k.stack;a=a?this.type+","+d:this.stackKey;var b="-"+a,r=this.negStacks,x=this.yAxis,D=x.stacking.stacks,u=x.stacking.oldStacks,B,F;x.stacking.stacksTouched+=1;for(F=0;F<n;F++){var C=f[F];var G=l[F];var I=this.getStackIndicator(I,
|
||||
C,this.index);var H=I.key;var J=(B=r&&G<(g?0:c))?b:a;D[J]||(D[J]={});D[J][C]||(u[J]&&u[J][C]?(D[J][C]=u[J][C],D[J][C].total=null):D[J][C]=new t(x,x.options.stackLabels,B,C,k));J=D[J][C];null!==G?(J.points[H]=J.points[this.index]=[h(J.cumulative,g)],p(J.cumulative)||(J.base=H),J.touched=x.stacking.stacksTouched,0<I.index&&!1===this.singleStacks&&(J.points[H][0]=J.points[this.index+","+C+",0"][0])):J.points[H]=J.points[this.index]=null;"percent"===d?(B=B?a:b,r&&D[B]&&D[B][C]?(B=D[B][C],J.total=B.total=
|
||||
Math.max(B.total,J.total)+Math.abs(G)||0):J.total=z(J.total+(Math.abs(G)||0))):"group"===d?(e(G)&&(G=G[0]),null!==G&&(J.total=(J.total||0)+1)):J.total=z(J.total+(G||0));J.cumulative="group"===d?(J.total||1)-1:h(J.cumulative,g)+(G||0);null!==G&&(J.points[H].push(J.cumulative),m[F]=J.cumulative,J.hasValidPoints=!0)}"percent"===d&&(x.stacking.usePercentage=!0);"group"!==d&&(this.stackedYData=m);x.stacking.oldStacks={}}};u.prototype.modifyStacks=function(){var a=this,d=a.stackKey,e=a.yAxis.stacking.stacks,
|
||||
f=a.processedXData,h,l=a.options.stacking;a[l+"Stacker"]&&[d,"-"+d].forEach(function(d){for(var c=f.length,g,b;c--;)if(g=f[c],h=a.getStackIndicator(h,g,a.index,d),b=(g=e[d]&&e[d][g])&&g.points[h.key])a[l+"Stacker"](b,g,c)})};u.prototype.percentStacker=function(a,d,e){d=d.total?100/d.total:0;a[0]=z(a[0]*d);a[1]=z(a[1]*d);this.stackedYData[e]=a[1]};u.prototype.getStackIndicator=function(a,d,e,f){!p(a)||a.x!==d||f&&a.stackKey!==f?a={x:d,index:0,key:f,stackKey:f}:a.index++;a.key=[e,d,a.index].join();
|
||||
return a};G.StackItem=t;"";return G.StackItem});M(f,"Series/Line/LineSeries.js",[f["Core/Series/Series.js"],f["Core/Series/SeriesRegistry.js"],f["Core/Utilities.js"]],function(a,f,C){var F=this&&this.__extends||function(){var a=function(f,z){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,f){a.__proto__=f}||function(a,f){for(var e in f)f.hasOwnProperty(e)&&(a[e]=f[e])};return a(f,z)};return function(f,z){function p(){this.constructor=f}a(f,z);f.prototype=null===z?Object.create(z):
|
||||
(p.prototype=z.prototype,new p)}}(),u=C.defined,H=C.merge;C=function(f){function B(){var a=null!==f&&f.apply(this,arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}F(B,f);B.prototype.drawGraph=function(){var a=this,f=this.options,m=(this.gappedPath||this.getGraphPath).call(this),e=this.chart.styledMode,d=[["graph","highcharts-graph"]];e||d[0].push(f.lineColor||this.color||"#cccccc",f.dashStyle);d=a.getZonesGraphs(d);d.forEach(function(d,h){var l=d[0],n=a[l],p=n?"animate":"attr";
|
||||
n?(n.endX=a.preventGraphAnimation?null:m.xMap,n.animate({d:m})):m.length&&(a[l]=n=a.chart.renderer.path(m).addClass(d[1]).attr({zIndex:1}).add(a.group));n&&!e&&(l={stroke:d[2],"stroke-width":f.lineWidth,fill:a.fillGraph&&a.color||"none"},d[3]?l.dashstyle=d[3]:"square"!==f.linecap&&(l["stroke-linecap"]=l["stroke-linejoin"]="round"),n[p](l).shadow(2>h&&f.shadow));n&&(n.startX=m.xMap,n.isArea=m.isArea)})};B.prototype.getGraphPath=function(a,f,m){var e=this,d=e.options,l=[],h=[],p,n=d.step;a=a||e.points;
|
||||
var v=a.reversed;v&&a.reverse();(n={right:1,center:2}[n]||n&&3)&&v&&(n=4-n);a=this.getValidPoints(a,!1,!(d.connectNulls&&!f&&!m));a.forEach(function(t,y){var A=t.plotX,q=t.plotY,k=a[y-1];(t.leftCliff||k&&k.rightCliff)&&!m&&(p=!0);t.isNull&&!u(f)&&0<y?p=!d.connectNulls:t.isNull&&!f?p=!0:(0===y||p?y=[["M",t.plotX,t.plotY]]:e.getPointSpline?y=[e.getPointSpline(a,t,y)]:n?(y=1===n?[["L",k.plotX,q]]:2===n?[["L",(k.plotX+A)/2,k.plotY],["L",(k.plotX+A)/2,q]]:[["L",A,k.plotY]],y.push(["L",A,q])):y=[["L",A,
|
||||
q]],h.push(t.x),n&&(h.push(t.x),2===n&&h.push(t.x)),l.push.apply(l,y),p=!1)});l.xMap=h;return e.graphPath=l};B.prototype.getZonesGraphs=function(a){this.zones.forEach(function(f,m){m=["zone-graph-"+m,"highcharts-graph highcharts-zone-graph-"+m+" "+(f.className||"")];this.chart.styledMode||m.push(f.color||this.color,f.dashStyle||this.options.dashStyle);a.push(m)},this);return a};B.defaultOptions=H(a.defaultOptions,{});return B}(a);f.registerSeriesType("line",C);"";return C});M(f,"Series/Area/AreaSeries.js",
|
||||
[f["Core/Color/Color.js"],f["Core/Legend/LegendSymbol.js"],f["Core/Series/SeriesRegistry.js"],f["Core/Utilities.js"]],function(a,f,C,G){var u=this&&this.__extends||function(){var a=function(e,d){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])};return a(e,d)};return function(e,d){function f(){this.constructor=e}a(e,d);e.prototype=null===d?Object.create(d):(f.prototype=d.prototype,new f)}}(),F=a.parse,
|
||||
I=C.seriesTypes.line;a=G.extend;var B=G.merge,z=G.objectEach,p=G.pick;G=function(a){function e(){var d=null!==a&&a.apply(this,arguments)||this;d.data=void 0;d.options=void 0;d.points=void 0;return d}u(e,a);e.prototype.drawGraph=function(){this.areaPath=[];a.prototype.drawGraph.apply(this);var d=this,e=this.areaPath,f=this.options,m=[["area","highcharts-area",this.color,f.fillColor]];this.zones.forEach(function(a,e){m.push(["zone-area-"+e,"highcharts-area highcharts-zone-area-"+e+" "+a.className,a.color||
|
||||
d.color,a.fillColor||f.fillColor])});m.forEach(function(a){var h=a[0],l=d[h],m=l?"animate":"attr",n={};l?(l.endX=d.preventGraphAnimation?null:e.xMap,l.animate({d:e})):(n.zIndex=0,l=d[h]=d.chart.renderer.path(e).addClass(a[1]).add(d.group),l.isArea=!0);d.chart.styledMode||(n.fill=p(a[3],F(a[2]).setOpacity(p(f.fillOpacity,.75)).get()));l[m](n);l.startX=e.xMap;l.shiftUnit=f.step?2:1})};e.prototype.getGraphPath=function(a){var d=I.prototype.getGraphPath,e=this.options,f=e.stacking,m=this.yAxis,v,w=[],
|
||||
y=[],A=this.index,q=m.stacking.stacks[this.stackKey],k=e.threshold,c=Math.round(m.getThreshold(e.threshold));e=p(e.connectNulls,"percent"===f);var g=function(b,d,e){var g=a[b];b=f&&q[g.x].points[A];var h=g[e+"Null"]||0;e=g[e+"Cliff"]||0;g=!0;if(e||h){var l=(h?b[0]:b[1])+e;var n=b[0]+e;g=!!h}else!f&&a[d]&&a[d].isNull&&(l=n=k);"undefined"!==typeof l&&(y.push({plotX:r,plotY:null===l?c:m.getThreshold(l),isNull:g,isCliff:!0}),w.push({plotX:r,plotY:null===n?c:m.getThreshold(n),doCurve:!1}))};a=a||this.points;
|
||||
f&&(a=this.getStackPoints(a));for(v=0;v<a.length;v++){f||(a[v].leftCliff=a[v].rightCliff=a[v].leftNull=a[v].rightNull=void 0);var b=a[v].isNull;var r=p(a[v].rectPlotX,a[v].plotX);var x=f?p(a[v].yBottom,c):c;if(!b||e)e||g(v,v-1,"left"),b&&!f&&e||(y.push(a[v]),w.push({x:v,plotX:r,plotY:x})),e||g(v,v+1,"right")}v=d.call(this,y,!0,!0);w.reversed=!0;b=d.call(this,w,!0,!0);(x=b[0])&&"M"===x[0]&&(b[0]=["L",x[1],x[2]]);b=v.concat(b);b.length&&b.push(["Z"]);d=d.call(this,y,!1,e);b.xMap=v.xMap;this.areaPath=
|
||||
b;return d};e.prototype.getStackPoints=function(a){var d=this,e=[],f=[],m=this.xAxis,v=this.yAxis,w=v.stacking.stacks[this.stackKey],y={},A=v.series,q=A.length,k=v.options.reversedStacks?1:-1,c=A.indexOf(d);a=a||this.points;if(this.options.stacking){for(var g=0;g<a.length;g++)a[g].leftNull=a[g].rightNull=void 0,y[a[g].x]=a[g];z(w,function(a,b){null!==a.total&&f.push(b)});f.sort(function(a,b){return a-b});var b=A.map(function(a){return a.visible});f.forEach(function(a,g){var h=0,l,n;if(y[a]&&!y[a].isNull)e.push(y[a]),
|
||||
[-1,1].forEach(function(e){var h=1===e?"rightNull":"leftNull",m=0,p=w[f[g+e]];if(p)for(var r=c;0<=r&&r<q;){var t=A[r].index;l=p.points[t];l||(t===d.index?y[a][h]=!0:b[r]&&(n=w[a].points[t])&&(m-=n[1]-n[0]));r+=k}y[a][1===e?"rightCliff":"leftCliff"]=m});else{for(var r=c;0<=r&&r<q;){if(l=w[a].points[A[r].index]){h=l[1];break}r+=k}h=p(h,0);h=v.translate(h,0,1,0,1);e.push({isNull:!0,plotX:m.translate(a,0,0,0,1),x:a,plotY:h,yBottom:h})}})}return e};e.defaultOptions=B(I.defaultOptions,{threshold:0});return e}(I);
|
||||
a(G.prototype,{singleStacks:!1,drawLegendSymbol:f.drawRectangle});C.registerSeriesType("area",G);"";return G});M(f,"Series/Spline/SplineSeries.js",[f["Core/Series/SeriesRegistry.js"],f["Core/Utilities.js"]],function(a,f){var F=this&&this.__extends||function(){var a=function(f,z){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,f){a.__proto__=f}||function(a,f){for(var e in f)f.hasOwnProperty(e)&&(a[e]=f[e])};return a(f,z)};return function(f,z){function p(){this.constructor=f}a(f,
|
||||
z);f.prototype=null===z?Object.create(z):(p.prototype=z.prototype,new p)}}(),G=a.seriesTypes.line,u=f.merge,H=f.pick;f=function(a){function f(){var f=null!==a&&a.apply(this,arguments)||this;f.data=void 0;f.options=void 0;f.points=void 0;return f}F(f,a);f.prototype.getPointSpline=function(a,f,m){var e=f.plotX||0,d=f.plotY||0,l=a[m-1];m=a[m+1];if(l&&!l.isNull&&!1!==l.doCurve&&!f.isCliff&&m&&!m.isNull&&!1!==m.doCurve&&!f.isCliff){a=l.plotY||0;var h=m.plotX||0;m=m.plotY||0;var p=0;var n=(1.5*e+(l.plotX||
|
||||
0))/2.5;var v=(1.5*d+a)/2.5;h=(1.5*e+h)/2.5;var w=(1.5*d+m)/2.5;h!==n&&(p=(w-v)*(h-e)/(h-n)+d-w);v+=p;w+=p;v>a&&v>d?(v=Math.max(a,d),w=2*d-v):v<a&&v<d&&(v=Math.min(a,d),w=2*d-v);w>m&&w>d?(w=Math.max(m,d),v=2*d-w):w<m&&w<d&&(w=Math.min(m,d),v=2*d-w);f.rightContX=h;f.rightContY=w}f=["C",H(l.rightContX,l.plotX,0),H(l.rightContY,l.plotY,0),H(n,e,0),H(v,d,0),e,d];l.rightContX=l.rightContY=void 0;return f};f.defaultOptions=u(G.defaultOptions);return f}(G);a.registerSeriesType("spline",f);"";return f});
|
||||
M(f,"Series/AreaSpline/AreaSplineSeries.js",[f["Series/Area/AreaSeries.js"],f["Series/Spline/SplineSeries.js"],f["Core/Legend/LegendSymbol.js"],f["Core/Series/SeriesRegistry.js"],f["Core/Utilities.js"]],function(a,f,C,G,u){var F=this&&this.__extends||function(){var a=function(f,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,e){a.__proto__=e}||function(a,e){for(var d in e)e.hasOwnProperty(d)&&(a[d]=e[d])};return a(f,e)};return function(f,e){function d(){this.constructor=f}a(f,
|
||||
e);f.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)}}(),I=a.prototype,B=u.extend,z=u.merge;u=function(p){function m(){var a=null!==p&&p.apply(this,arguments)||this;a.data=void 0;a.points=void 0;a.options=void 0;return a}F(m,p);m.defaultOptions=z(f.defaultOptions,a.defaultOptions);return m}(f);B(u.prototype,{getGraphPath:I.getGraphPath,getStackPoints:I.getStackPoints,drawGraph:I.drawGraph,drawLegendSymbol:C.drawRectangle});G.registerSeriesType("areaspline",u);"";return u});M(f,
|
||||
"Series/Column/ColumnSeries.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/Color/Color.js"],f["Core/Globals.js"],f["Core/Legend/LegendSymbol.js"],f["Core/Series/Series.js"],f["Core/Series/SeriesRegistry.js"],f["Core/Utilities.js"]],function(a,f,C,G,u,H,I){var B=this&&this.__extends||function(){var a=function(d,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return a(d,c)};return function(d,
|
||||
c){function e(){this.constructor=d}a(d,c);d.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)}}(),z=a.animObject,p=f.parse,m=C.hasTouch;a=C.noop;var e=I.clamp,d=I.css,l=I.defined,h=I.extend,t=I.fireEvent,n=I.isArray,v=I.isNumber,w=I.merge,y=I.pick,A=I.objectEach;I=function(a){function f(){var c=null!==a&&a.apply(this,arguments)||this;c.borderWidth=void 0;c.data=void 0;c.group=void 0;c.options=void 0;c.points=void 0;return c}B(f,a);f.prototype.animate=function(a){var c=this,b=this.yAxis,
|
||||
d=c.options,f=this.chart.inverted,k={},l=f?"translateX":"translateY";if(a)k.scaleY=.001,a=e(b.toPixels(d.threshold),b.pos,b.pos+b.len),f?k.translateX=a-b.len:k.translateY=a,c.clipBox&&c.setClip(),c.group.attr(k);else{var m=Number(c.group.attr(l));c.group.animate({scaleY:1},h(z(c.options.animation),{step:function(a,d){c.group&&(k[l]=m+d.pos*(b.pos-m),c.group.attr(k))}}))}};f.prototype.init=function(c,d){a.prototype.init.apply(this,arguments);var b=this;c=b.chart;c.hasRendered&&c.series.forEach(function(a){a.type===
|
||||
b.type&&(a.isDirty=!0)})};f.prototype.getColumnMetrics=function(){var a=this,d=a.options,b=a.xAxis,e=a.yAxis,f=b.options.reversedStacks;f=b.reversed&&!f||!b.reversed&&f;var k={},h,l=0;!1===d.grouping?l=1:a.chart.series.forEach(function(b){var c=b.yAxis,d=b.options;if(b.type===a.type&&(b.visible||!a.chart.options.chart.ignoreHiddenSeries)&&e.len===c.len&&e.pos===c.pos){if(d.stacking&&"group"!==d.stacking){h=b.stackKey;"undefined"===typeof k[h]&&(k[h]=l++);var f=k[h]}else!1!==d.grouping&&(f=l++);b.columnIndex=
|
||||
f}});var m=Math.min(Math.abs(b.transA)*(b.ordinal&&b.ordinal.slope||d.pointRange||b.closestPointRange||b.tickInterval||1),b.len),n=m*d.groupPadding,q=(m-2*n)/(l||1);d=Math.min(d.maxPointWidth||b.len,y(d.pointWidth,q*(1-2*d.pointPadding)));a.columnMetrics={width:d,offset:(q-d)/2+(n+((a.columnIndex||0)+(f?1:0))*q-m/2)*(f?-1:1),paddedWidth:q,columnCount:l};return a.columnMetrics};f.prototype.crispCol=function(a,d,b,e){var c=this.chart,f=this.borderWidth,g=-(f%2?.5:0);f=f%2?.5:1;c.inverted&&c.renderer.isVML&&
|
||||
(f+=1);this.options.crisp&&(b=Math.round(a+b)+g,a=Math.round(a)+g,b-=a);e=Math.round(d+e)+f;g=.5>=Math.abs(d)&&.5<e;d=Math.round(d)+f;e-=d;g&&e&&(--d,e+=1);return{x:a,y:d,width:b,height:e}};f.prototype.adjustForMissingColumns=function(a,d,b,e){var c=this,f=this.options.stacking;if(!b.isNull&&1<e.columnCount){var g=this.yAxis.options.reversedStacks,k=0,h=g?0:-e.columnCount;A(this.yAxis.stacking&&this.yAxis.stacking.stacks,function(a){if("number"===typeof b.x&&(a=a[b.x.toString()])){var d=a.points[c.index],
|
||||
e=a.total;f?(d&&(k=h),a.hasValidPoints&&(g?h++:h--)):n(d)&&(k=d[1],h=e||0)}});a=(b.plotX||0)+((h-1)*e.paddedWidth+d)/2-d-k*e.paddedWidth}return a};f.prototype.translate=function(){var a=this,d=a.chart,b=a.options,f=a.dense=2>a.closestPointRange*a.xAxis.transA;f=a.borderWidth=y(b.borderWidth,f?0:1);var k=a.xAxis,h=a.yAxis,m=b.threshold,n=a.translatedThreshold=h.getThreshold(m),q=y(b.minPointLength,5),p=a.getColumnMetrics(),t=p.width,A=a.pointXOffset=p.offset,w=a.dataMin,z=a.dataMax,B=a.barW=Math.max(t,
|
||||
1+2*f);d.inverted&&(n-=.5);b.pointPadding&&(B=Math.ceil(B));u.prototype.translate.apply(a);a.points.forEach(function(c){var f=y(c.yBottom,n),g=999+Math.abs(f),r=c.plotX||0;g=e(c.plotY,-g,h.len+g);var x=Math.min(g,f),D=Math.max(g,f)-x,u=t,F=r+A,C=B;q&&Math.abs(D)<q&&(D=q,r=!h.reversed&&!c.negative||h.reversed&&c.negative,v(m)&&v(z)&&c.y===m&&z<=m&&(h.min||0)<m&&(w!==z||(h.max||0)<=m)&&(r=!r),x=Math.abs(x-n)>q?f-q:n-(r?q:0));l(c.options.pointWidth)&&(u=C=Math.ceil(c.options.pointWidth),F-=Math.round((u-
|
||||
t)/2));b.centerInCategory&&(F=a.adjustForMissingColumns(F,u,c,p));c.barX=F;c.pointWidth=u;c.tooltipPos=d.inverted?[e(h.len+h.pos-d.plotLeft-g,h.pos-d.plotLeft,h.len+h.pos-d.plotLeft),k.len+k.pos-d.plotTop-F-C/2,D]:[k.left-d.plotLeft+F+C/2,e(g+h.pos-d.plotTop,h.pos-d.plotTop,h.len+h.pos-d.plotTop),D];c.shapeType=a.pointClass.prototype.shapeType||"rect";c.shapeArgs=a.crispCol.apply(a,c.isNull?[F,n,C,0]:[F,x,C,D])})};f.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")};
|
||||
f.prototype.pointAttribs=function(a,d){var b=this.options,c=this.pointAttrToOptions||{},e=c.stroke||"borderColor",f=c["stroke-width"]||"borderWidth",g=a&&a.color||this.color,k=a&&a[e]||b[e]||g;c=a&&a.options.dashStyle||b.dashStyle;var h=a&&a[f]||b[f]||this[f]||0,l=y(a&&a.opacity,b.opacity,1);if(a&&this.zones.length){var m=a.getZone();g=a.options.color||m&&(m.color||a.nonZonedColor)||this.color;m&&(k=m.borderColor||k,c=m.dashStyle||c,h=m.borderWidth||h)}d&&a&&(a=w(b.states[d],a.options.states&&a.options.states[d]||
|
||||
{}),d=a.brightness,g=a.color||"undefined"!==typeof d&&p(g).brighten(a.brightness).get()||g,k=a[e]||k,h=a[f]||h,c=a.dashStyle||c,l=y(a.opacity,l));e={fill:g,stroke:k,"stroke-width":h,opacity:l};c&&(e.dashstyle=c);return e};f.prototype.drawPoints=function(){var a=this,d=this.chart,b=a.options,e=d.renderer,f=b.animationLimit||250,k;a.points.forEach(function(c){var g=c.graphic,h=!!g,l=g&&d.pointCount<f?"animate":"attr";if(v(c.plotY)&&null!==c.y){k=c.shapeArgs;g&&c.hasNewShapeType()&&(g=g.destroy());a.enabledDataSorting&&
|
||||
(c.startXPos=a.xAxis.reversed?-(k?k.width||0:0):a.xAxis.width);g||(c.graphic=g=e[c.shapeType](k).add(c.group||a.group))&&a.enabledDataSorting&&d.hasRendered&&d.pointCount<f&&(g.attr({x:c.startXPos}),h=!0,l="animate");if(g&&h)g[l](w(k));if(b.borderRadius)g[l]({r:b.borderRadius});d.styledMode||g[l](a.pointAttribs(c,c.selected&&"select")).shadow(!1!==c.allowShadow&&b.shadow,null,b.stacking&&!b.borderRadius);g&&(g.addClass(c.getClassName(),!0),g.attr({visibility:c.visible?"inherit":"hidden"}))}else g&&
|
||||
(c.graphic=g.destroy())})};f.prototype.drawTracker=function(){var a=this,e=a.chart,b=e.pointer,f=function(a){var c=b.getPointFromEvent(a);"undefined"!==typeof c&&(b.isDirectTouch=!0,c.onMouseOver(a))},k;a.points.forEach(function(a){k=n(a.dataLabels)?a.dataLabels:a.dataLabel?[a.dataLabel]:[];a.graphic&&(a.graphic.element.point=a);k.forEach(function(b){b.div?b.div.point=a:b.element.point=a})});a._hasTracking||(a.trackerGroups.forEach(function(c){if(a[c]){a[c].addClass("highcharts-tracker").on("mouseover",
|
||||
f).on("mouseout",function(a){b.onTrackerMouseOut(a)});if(m)a[c].on("touchstart",f);!e.styledMode&&a.options.cursor&&a[c].css(d).css({cursor:a.options.cursor})}}),a._hasTracking=!0);t(this,"afterDrawTracker")};f.prototype.remove=function(){var a=this,d=a.chart;d.hasRendered&&d.series.forEach(function(b){b.type===a.type&&(b.isDirty=!0)});u.prototype.remove.apply(a,arguments)};f.defaultOptions=w(u.defaultOptions,{borderRadius:0,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,
|
||||
cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"});return f}(u);h(I.prototype,{cropShoulder:0,directTouch:!0,drawLegendSymbol:G.drawRectangle,getSymbol:a,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]});H.registerSeriesType("column",I);"";"";return I});M(f,"Core/Series/DataLabel.js",
|
||||
[f["Core/Animation/AnimationUtilities.js"],f["Core/FormatUtilities.js"],f["Core/Utilities.js"]],function(a,f,C){var F=a.getDeferredAnimation,u=f.format,H=C.defined,I=C.extend,B=C.fireEvent,z=C.isArray,p=C.merge,m=C.objectEach,e=C.pick,d=C.splat,l;(function(a){function f(a,c,d,b,f){var g=this,k=this.chart,h=this.isCartesian&&k.inverted,l=this.enabledDataSorting,m=e(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),n=e(a.plotY,-9999),q=c.getBBox(),p=d.rotation,r=d.align,t=k.isInsidePlot(m,Math.round(n),{inverted:h,
|
||||
paneCoordinates:!0,series:g}),A=function(b){l&&g.xAxis&&!y&&g.setDataLabelStartPos(a,c,f,t,b)},y="justify"===e(d.overflow,l?"none":"justify"),w=this.visible&&!1!==a.visible&&(a.series.forceDL||l&&!y||t||e(d.inside,!!this.options.stacking)&&b&&k.isInsidePlot(m,h?b.x+1:b.y+b.height-1,{inverted:h,paneCoordinates:!0,series:g}));if(w){var v=k.renderer.fontMetrics(k.styledMode?void 0:d.style.fontSize,c).b;b=I({x:h?this.yAxis.len-n:m,y:Math.round(h?this.xAxis.len-m:n),width:0,height:0},b);I(d,{width:q.width,
|
||||
height:q.height});p?(y=!1,m=k.renderer.rotCorr(v,p),m={x:b.x+(d.x||0)+b.width/2+m.x,y:b.y+(d.y||0)+{top:0,middle:.5,bottom:1}[d.verticalAlign]*b.height},A(m),c[f?"attr":"animate"](m).attr({align:r}),A=(p+720)%360,A=180<A&&360>A,"left"===r?m.y-=A?q.height:0:"center"===r?(m.x-=q.width/2,m.y-=q.height/2):"right"===r&&(m.x-=q.width,m.y-=A?0:q.height),c.placed=!0,c.alignAttr=m):(A(b),c.align(d,void 0,b),m=c.alignAttr);y&&0<=b.height?this.justifyDataLabel(c,d,m,q,b,f):e(d.crop,!0)&&(w=k.isInsidePlot(m.x,
|
||||
m.y,{paneCoordinates:!0,series:g})&&k.isInsidePlot(m.x+q.width,m.y+q.height,{paneCoordinates:!0,series:g}));if(d.shape&&!p)c[f?"attr":"animate"]({anchorX:h?k.plotWidth-a.plotY:a.plotX,anchorY:h?k.plotHeight-a.plotX:a.plotY})}f&&l&&(c.placed=!1);w||l&&!y||(c.hide(!0),c.placed=!1)}function h(a,c){var d=c.filter;return d?(c=d.operator,a=a[d.property],d=d.value,">"===c&&a>d||"<"===c&&a<d||">="===c&&a>=d||"<="===c&&a<=d||"=="===c&&a==d||"==="===c&&a===d?!0:!1):!0}function l(){var a=this,c=a.chart,f=a.options,
|
||||
b=a.points,l=a.hasRendered||0,n=c.renderer,q=f.dataLabels,p,t=q.animation;t=q.defer?F(c,t,a):{defer:0,duration:0};q=y(y(c.options.plotOptions&&c.options.plotOptions.series&&c.options.plotOptions.series.dataLabels,c.options.plotOptions&&c.options.plotOptions[a.type]&&c.options.plotOptions[a.type].dataLabels),q);B(this,"drawDataLabels");if(z(q)||q.enabled||a._hasPointLabels){var A=a.plotGroup("dataLabelsGroup","data-labels",l?"inherit":"hidden",q.zIndex||6);A.attr({opacity:+l});!l&&(l=a.dataLabelsGroup)&&
|
||||
(a.visible&&A.show(!0),l[f.animation?"animate":"attr"]({opacity:1},t));b.forEach(function(b){p=d(y(q,b.dlOptions||b.options&&b.options.dataLabels));p.forEach(function(d,g){var k=d.enabled&&(!b.isNull||b.dataLabelOnNull)&&h(b,d),l=b.connectors?b.connectors[g]:b.connector,q=b.dataLabels?b.dataLabels[g]:b.dataLabel,p=!q,r=e(d.distance,b.labelDistance);if(k){var t=b.getLabelConfig();var y=e(d[b.formatPrefix+"Format"],d.format);t=H(y)?u(y,t,c):(d[b.formatPrefix+"Formatter"]||d.formatter).call(t,d);y=d.style;
|
||||
var x=d.rotation;c.styledMode||(y.color=e(d.color,y.color,a.color,"#000000"),"contrast"===y.color?(b.contrastColor=n.getContrast(b.color||a.color),y.color=!H(r)&&d.inside||0>r||f.stacking?b.contrastColor:"#000000"):delete b.contrastColor,f.cursor&&(y.cursor=f.cursor));var w={r:d.borderRadius||0,rotation:x,padding:d.padding,zIndex:1};c.styledMode||(w.fill=d.backgroundColor,w.stroke=d.borderColor,w["stroke-width"]=d.borderWidth);m(w,function(a,b){"undefined"===typeof a&&delete w[b]})}!q||k&&H(t)&&!!q.div===
|
||||
!!d.useHTML&&(q.rotation&&d.rotation||q.rotation===d.rotation)||(p=!0,b.dataLabel=q=b.dataLabel&&b.dataLabel.destroy(),b.dataLabels&&(1===b.dataLabels.length?delete b.dataLabels:delete b.dataLabels[g]),g||delete b.dataLabel,l&&(b.connector=b.connector.destroy(),b.connectors&&(1===b.connectors.length?delete b.connectors:delete b.connectors[g])));k&&H(t)&&(q?w.text=t:(b.dataLabels=b.dataLabels||[],q=b.dataLabels[g]=x?n.text(t,0,-9999,d.useHTML).addClass("highcharts-data-label"):n.label(t,0,-9999,d.shape,
|
||||
null,null,d.useHTML,null,"data-label"),g||(b.dataLabel=q),q.addClass(" highcharts-data-label-color-"+b.colorIndex+" "+(d.className||"")+(d.useHTML?" highcharts-tracker":""))),q.options=d,q.attr(w),c.styledMode||q.css(y).shadow(d.shadow),q.added||q.add(A),d.textPath&&!d.useHTML&&(q.setTextPath(b.getDataLabelPath&&b.getDataLabelPath(q)||b.graphic,d.textPath),b.dataLabelPath&&!d.textPath.enabled&&(b.dataLabelPath=b.dataLabelPath.destroy())),a.alignDataLabel(b,q,d,null,p))})})}B(this,"afterDrawDataLabels")}
|
||||
function w(a,c,d,b,e,f){var g=this.chart,h=c.align,k=c.verticalAlign,l=a.box?0:a.padding||0,m=c.x;m=void 0===m?0:m;var q=c.y;q=void 0===q?0:q;var n=(d.x||0)+l;if(0>n){"right"===h&&0<=m?(c.align="left",c.inside=!0):m-=n;var p=!0}n=(d.x||0)+b.width-l;n>g.plotWidth&&("left"===h&&0>=m?(c.align="right",c.inside=!0):m+=g.plotWidth-n,p=!0);n=d.y+l;0>n&&("bottom"===k&&0<=q?(c.verticalAlign="top",c.inside=!0):q-=n,p=!0);n=(d.y||0)+b.height-l;n>g.plotHeight&&("top"===k&&0>=q?(c.verticalAlign="bottom",c.inside=
|
||||
!0):q+=g.plotHeight-n,p=!0);p&&(c.x=m,c.y=q,a.placed=!f,a.align(c,void 0,e));return p}function y(a,c){var d=[],b;if(z(a)&&!z(c))d=a.map(function(a){return p(a,c)});else if(z(c)&&!z(a))d=c.map(function(b){return p(a,b)});else if(z(a)||z(c))for(b=Math.max(a.length,c.length);b--;)d[b]=p(a[b],c[b]);else d=p(a,c);return d}function A(a,c,d,b,e){var f=this.chart,g=f.inverted,h=this.xAxis,k=h.reversed,l=g?c.height/2:c.width/2;a=(a=a.pointWidth)?a/2:0;c.startXPos=g?e.x:k?-l-a:h.width-l+a;c.startYPos=g?k?this.yAxis.height-
|
||||
l+a:-l-a:e.y;b?"hidden"===c.visibility&&(c.show(),c.attr({opacity:0}).animate({opacity:1})):c.attr({opacity:1}).animate({opacity:0},void 0,c.hide);f.hasRendered&&(d&&c.attr({x:c.startXPos,y:c.startYPos}),c.placed=!0)}var q=[];a.compose=function(a){if(-1===q.indexOf(a)){var c=a.prototype;q.push(a);c.alignDataLabel=f;c.drawDataLabels=l;c.justifyDataLabel=w;c.setDataLabelStartPos=A}}})(l||(l={}));"";return l});M(f,"Series/Column/ColumnDataLabel.js",[f["Core/Series/DataLabel.js"],f["Core/Series/SeriesRegistry.js"],
|
||||
f["Core/Utilities.js"]],function(a,f,C){var F=f.series,u=C.merge,H=C.pick,I;(function(f){function z(a,e,d,f,h){var l=this.chart.inverted,m=a.series,p=(m.xAxis?m.xAxis.len:this.chart.plotSizeX)||0;m=(m.yAxis?m.yAxis.len:this.chart.plotSizeY)||0;var w=a.dlBox||a.shapeArgs,y=H(a.below,a.plotY>H(this.translatedThreshold,m)),A=H(d.inside,!!this.options.stacking);w&&(f=u(w),0>f.y&&(f.height+=f.y,f.y=0),w=f.y+f.height-m,0<w&&w<f.height&&(f.height-=w),l&&(f={x:m-f.y-f.height,y:p-f.x-f.width,width:f.height,
|
||||
height:f.width}),A||(l?(f.x+=y?0:f.width,f.width=0):(f.y+=y?f.height:0,f.height=0)));d.align=H(d.align,!l||A?"center":y?"right":"left");d.verticalAlign=H(d.verticalAlign,l||A?"middle":y?"top":"bottom");F.prototype.alignDataLabel.call(this,a,e,d,f,h);d.inside&&a.contrastColor&&e.css({color:a.contrastColor})}var p=[];f.compose=function(f){a.compose(F);-1===p.indexOf(f)&&(p.push(f),f.prototype.alignDataLabel=z)}})(I||(I={}));return I});M(f,"Series/Bar/BarSeries.js",[f["Series/Column/ColumnSeries.js"],
|
||||
f["Core/Series/SeriesRegistry.js"],f["Core/Utilities.js"]],function(a,f,C){var F=this&&this.__extends||function(){var a=function(f,u){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,f){a.__proto__=f}||function(a,f){for(var e in f)f.hasOwnProperty(e)&&(a[e]=f[e])};return a(f,u)};return function(f,u){function p(){this.constructor=f}a(f,u);f.prototype=null===u?Object.create(u):(p.prototype=u.prototype,new p)}}(),u=C.extend,H=C.merge;C=function(f){function u(){var a=null!==f&&f.apply(this,
|
||||
arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}F(u,f);u.defaultOptions=H(a.defaultOptions,{});return u}(a);u(C.prototype,{inverted:!0});f.registerSeriesType("bar",C);"";return C});M(f,"Series/Scatter/ScatterSeries.js",[f["Series/Column/ColumnSeries.js"],f["Series/Line/LineSeries.js"],f["Core/Series/SeriesRegistry.js"],f["Core/Utilities.js"]],function(a,f,C,G){var u=this&&this.__extends||function(){var a=function(f,m){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&
|
||||
function(a,d){a.__proto__=d}||function(a,d){for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])};return a(f,m)};return function(f,m){function e(){this.constructor=f}a(f,m);f.prototype=null===m?Object.create(m):(e.prototype=m.prototype,new e)}}(),F=G.addEvent,I=G.extend,B=G.merge;G=function(a){function p(){var f=null!==a&&a.apply(this,arguments)||this;f.data=void 0;f.options=void 0;f.points=void 0;return f}u(p,a);p.prototype.applyJitter=function(){var a=this,e=this.options.jitter,d=this.points.length;
|
||||
e&&this.points.forEach(function(f,h){["x","y"].forEach(function(l,m){var n="plot"+l.toUpperCase();if(e[l]&&!f.isNull){var p=a[l+"Axis"];var t=e[l]*p.transA;if(p&&!p.isLog){var A=Math.max(0,f[n]-t);p=Math.min(p.len,f[n]+t);m=1E4*Math.sin(h+m*d);f[n]=A+(p-A)*(m-Math.floor(m));"x"===l&&(f.clientX=f.plotX)}}})})};p.prototype.drawGraph=function(){this.options.lineWidth?a.prototype.drawGraph.call(this):this.graph&&(this.graph=this.graph.destroy())};p.defaultOptions=B(f.defaultOptions,{lineWidth:0,findNearestPointBy:"xy",
|
||||
jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}});return p}(f);I(G.prototype,{drawTracker:a.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1});F(G,"afterTranslate",function(){this.applyJitter()});C.registerSeriesType("scatter",
|
||||
G);"";return G});M(f,"Series/CenteredUtilities.js",[f["Core/Globals.js"],f["Core/Series/Series.js"],f["Core/Utilities.js"]],function(a,f,C){var F=a.deg2rad,u=C.isNumber,H=C.pick,I=C.relativeLength,B;(function(a){a.getCenter=function(){var a=this.options,m=this.chart,e=2*(a.slicedOffset||0),d=m.plotWidth-2*e,l=m.plotHeight-2*e,h=a.center,t=Math.min(d,l),n=a.size,v=a.innerSize||0;"string"===typeof n&&(n=parseFloat(n));"string"===typeof v&&(v=parseFloat(v));a=[H(h[0],"50%"),H(h[1],"50%"),H(n&&0>n?void 0:
|
||||
a.size,"100%"),H(v&&0>v?void 0:a.innerSize||0,"0%")];!m.angular||this instanceof f||(a[3]=0);for(h=0;4>h;++h)n=a[h],m=2>h||2===h&&/%$/.test(n),a[h]=I(n,[d,l,t,a[2]][h])+(m?e:0);a[3]>a[2]&&(a[3]=a[2]);return a};a.getStartAndEndRadians=function(a,f){a=u(a)?a:0;f=u(f)&&f>a&&360>f-a?f:a+360;return{start:F*(a+-90),end:F*(f+-90)}}})(B||(B={}));"";return B});M(f,"Series/Pie/PiePoint.js",[f["Core/Animation/AnimationUtilities.js"],f["Core/Series/Point.js"],f["Core/Utilities.js"]],function(a,f,C){var F=this&&
|
||||
this.__extends||function(){var a=function(e,d){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])};return a(e,d)};return function(e,d){function f(){this.constructor=e}a(e,d);e.prototype=null===d?Object.create(d):(f.prototype=d.prototype,new f)}}(),u=a.setAnimation,H=C.addEvent,I=C.defined;a=C.extend;var B=C.isNumber,z=C.pick,p=C.relativeLength;f=function(a){function e(){var d=null!==a&&a.apply(this,arguments)||
|
||||
this;d.labelDistance=void 0;d.options=void 0;d.series=void 0;return d}F(e,a);e.prototype.getConnectorPath=function(){var a=this.labelPosition,e=this.series.options.dataLabels,f=this.connectorShapes,m=e.connectorShape;f[m]&&(m=f[m]);return m.call(this,{x:a.final.x,y:a.final.y,alignment:a.alignment},a.connectorPosition,e)};e.prototype.getTranslate=function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}};e.prototype.haloPath=function(a){var d=this.shapeArgs;return this.sliced||
|
||||
!this.visible?[]:this.series.chart.renderer.symbols.arc(d.x,d.y,d.r+a,d.r+a,{innerR:d.r-1,start:d.start,end:d.end})};e.prototype.init=function(){var d=this;a.prototype.init.apply(this,arguments);this.name=z(this.name,"Slice");var e=function(a){d.slice("select"===a.type)};H(this,"select",e);H(this,"unselect",e);return this};e.prototype.isValid=function(){return B(this.y)&&0<=this.y};e.prototype.setVisible=function(a,e){var d=this,f=this.series,m=f.chart,l=f.options.ignoreHiddenPoint;e=z(e,l);a!==this.visible&&
|
||||
(this.visible=this.options.visible=a="undefined"===typeof a?!this.visible:a,f.options.data[f.data.indexOf(this)]=this.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(e){if(d[e])d[e][a?"show":"hide"](a)}),this.legendItem&&m.legend.colorizeItem(this,a),a||"hover"!==this.state||this.setState(""),l&&(f.isDirty=!0),e&&m.redraw())};e.prototype.slice=function(a,e,f){var d=this.series;u(f,d.chart);z(e,!0);this.sliced=this.options.sliced=I(a)?a:!this.sliced;d.options.data[d.data.indexOf(this)]=
|
||||
this.options;this.graphic&&this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())};return e}(f);a(f.prototype,{connectorShapes:{fixedOffset:function(a,e,d){var f=e.breakAt;e=e.touchingSliceAt;return[["M",a.x,a.y],d.softConnector?["C",a.x+("left"===a.alignment?-5:5),a.y,2*f.x-e.x,2*f.y-e.y,f.x,f.y]:["L",f.x,f.y],["L",e.x,e.y]]},straight:function(a,e){e=e.touchingSliceAt;return[["M",a.x,a.y],["L",e.x,e.y]]},crookedLine:function(a,e,d){e=e.touchingSliceAt;
|
||||
var f=this.series,h=f.center[0],m=f.chart.plotWidth,n=f.chart.plotLeft;f=a.alignment;var u=this.shapeArgs.r;d=p(d.crookDistance,1);m="left"===f?h+u+(m+n-h-u)*(1-d):n+(h-u)*d;d=["L",m,a.y];h=!0;if("left"===f?m>a.x||m<e.x:m<a.x||m>e.x)h=!1;a=[["M",a.x,a.y]];h&&a.push(d);a.push(["L",e.x,e.y]);return a}}});return f});M(f,"Series/Pie/PieSeries.js",[f["Series/CenteredUtilities.js"],f["Series/Column/ColumnSeries.js"],f["Core/Globals.js"],f["Core/Legend/LegendSymbol.js"],f["Series/Pie/PiePoint.js"],f["Core/Series/Series.js"],
|
||||
f["Core/Series/SeriesRegistry.js"],f["Core/Renderer/SVG/Symbols.js"],f["Core/Utilities.js"]],function(a,f,C,G,u,H,I,B,z){var p=this&&this.__extends||function(){var a=function(d,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])};return a(d,e)};return function(d,e){function f(){this.constructor=d}a(d,e);d.prototype=null===e?Object.create(e):(f.prototype=e.prototype,new f)}}(),m=a.getStartAndEndRadians;
|
||||
C=C.noop;var e=z.clamp,d=z.extend,l=z.fireEvent,h=z.merge,t=z.pick,n=z.relativeLength;z=function(a){function d(){var d=null!==a&&a.apply(this,arguments)||this;d.center=void 0;d.data=void 0;d.maxLabelDistance=void 0;d.options=void 0;d.points=void 0;return d}p(d,a);d.prototype.animate=function(a){var d=this,e=d.points,f=d.startAngleRad;a||e.forEach(function(a){var c=a.graphic,b=a.shapeArgs;c&&b&&(c.attr({r:t(a.startR,d.center&&d.center[3]/2),start:f,end:f}),c.animate({r:b.r,start:b.start,end:b.end},
|
||||
d.options.animation))})};d.prototype.drawEmpty=function(){var a=this.startAngleRad,d=this.endAngleRad,e=this.options;if(0===this.total&&this.center){var f=this.center[0];var c=this.center[1];this.graph||(this.graph=this.chart.renderer.arc(f,c,this.center[1]/2,0,a,d).addClass("highcharts-empty-series").add(this.group));this.graph.attr({d:B.arc(f,c,this.center[2]/2,0,{start:a,end:d,innerR:this.center[3]/2})});this.chart.styledMode||this.graph.attr({"stroke-width":e.borderWidth,fill:e.fillColor||"none",
|
||||
stroke:e.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())};d.prototype.drawPoints=function(){var a=this.chart.renderer;this.points.forEach(function(d){d.graphic&&d.hasNewShapeType()&&(d.graphic=d.graphic.destroy());d.graphic||(d.graphic=a[d.shapeType](d.shapeArgs).add(d.series.group),d.delayedRendering=!0)})};d.prototype.generatePoints=function(){a.prototype.generatePoints.call(this);this.updateTotals()};d.prototype.getX=function(a,d,f){var h=this.center,c=this.radii?this.radii[f.index]||
|
||||
0:h[2]/2;a=Math.asin(e((a-h[1])/(c+f.labelDistance),-1,1));return h[0]+(d?-1:1)*Math.cos(a)*(c+f.labelDistance)+(0<f.labelDistance?(d?-1:1)*this.options.dataLabels.padding:0)};d.prototype.hasData=function(){return!!this.processedXData.length};d.prototype.redrawPoints=function(){var a=this,d=a.chart,e=d.renderer,f=a.options.shadow,c,g,b,m;this.drawEmpty();!f||a.shadowGroup||d.styledMode||(a.shadowGroup=e.g("shadow").attr({zIndex:-1}).add(a.group));a.points.forEach(function(k){var l={};g=k.graphic;
|
||||
if(!k.isNull&&g){var n=void 0;m=k.shapeArgs;c=k.getTranslate();d.styledMode||(n=k.shadowGroup,f&&!n&&(n=k.shadowGroup=e.g("shadow").add(a.shadowGroup)),n&&n.attr(c),b=a.pointAttribs(k,k.selected&&"select"));k.delayedRendering?(g.setRadialReference(a.center).attr(m).attr(c),d.styledMode||g.attr(b).attr({"stroke-linejoin":"round"}).shadow(f,n),k.delayedRendering=!1):(g.setRadialReference(a.center),d.styledMode||h(!0,l,b),h(!0,l,m,c),g.animate(l));g.attr({visibility:k.visible?"inherit":"hidden"});g.addClass(k.getClassName(),
|
||||
!0)}else g&&(k.graphic=g.destroy())})};d.prototype.sortByAngle=function(a,d){a.sort(function(a,e){return"undefined"!==typeof a.angle&&(e.angle-a.angle)*d})};d.prototype.translate=function(a){this.generatePoints();var d=this.options,e=d.slicedOffset,f=e+(d.borderWidth||0),c=m(d.startAngle,d.endAngle),g=this.startAngleRad=c.start;c=(this.endAngleRad=c.end)-g;var b=this.points,h=d.dataLabels.distance;d=d.ignoreHiddenPoint;var p=b.length,u,w=0;a||(this.center=a=this.getCenter());for(u=0;u<p;u++){var v=
|
||||
b[u];var y=g+w*c;!v.isValid()||d&&!v.visible||(w+=v.percentage/100);var z=g+w*c;var B={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*y)/1E3,end:Math.round(1E3*z)/1E3};v.shapeType="arc";v.shapeArgs=B;v.labelDistance=t(v.options.dataLabels&&v.options.dataLabels.distance,h);v.labelDistance=n(v.labelDistance,B.r);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,v.labelDistance);z=(z+y)/2;z>1.5*Math.PI?z-=2*Math.PI:z<-Math.PI/2&&(z+=2*Math.PI);v.slicedTranslation={translateX:Math.round(Math.cos(z)*
|
||||
e),translateY:Math.round(Math.sin(z)*e)};B=Math.cos(z)*a[2]/2;var F=Math.sin(z)*a[2]/2;v.tooltipPos=[a[0]+.7*B,a[1]+.7*F];v.half=z<-Math.PI/2||z>Math.PI/2?1:0;v.angle=z;y=Math.min(f,v.labelDistance/5);v.labelPosition={natural:{x:a[0]+B+Math.cos(z)*v.labelDistance,y:a[1]+F+Math.sin(z)*v.labelDistance},"final":{},alignment:0>v.labelDistance?"center":v.half?"right":"left",connectorPosition:{breakAt:{x:a[0]+B+Math.cos(z)*y,y:a[1]+F+Math.sin(z)*y},touchingSliceAt:{x:a[0]+B,y:a[1]+F}}}}l(this,"afterTranslate")};
|
||||
d.prototype.updateTotals=function(){var a=this.points,d=a.length,e=this.options.ignoreHiddenPoint,f,c=0;for(f=0;f<d;f++){var g=a[f];!g.isValid()||e&&!g.visible||(c+=g.y)}this.total=c;for(f=0;f<d;f++)g=a[f],g.percentage=0<c&&(g.visible||!e)?g.y/c*100:0,g.total=c};d.defaultOptions=h(H.defaultOptions,{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:!0,formatter:function(){return this.point.isNull?
|
||||
void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}});return d}(H);d(z.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawLegendSymbol:G.drawRectangle,drawTracker:f.prototype.drawTracker,getCenter:a.getCenter,getSymbol:C,isCartesian:!1,
|
||||
noSharedTooltip:!0,pointAttribs:f.prototype.pointAttribs,pointClass:u,requireSorting:!1,searchPoint:C,trackerGroups:["group","dataLabelsGroup"]});I.registerSeriesType("pie",z);"";return z});M(f,"Series/Pie/PieDataLabel.js",[f["Core/Series/DataLabel.js"],f["Core/Globals.js"],f["Core/Renderer/RendererUtilities.js"],f["Core/Series/SeriesRegistry.js"],f["Core/Utilities.js"]],function(a,f,C,G,u){var F=f.noop,I=C.distribute,B=G.series,z=u.arrayMax,p=u.clamp,m=u.defined,e=u.merge,d=u.pick,l=u.relativeLength,
|
||||
h;(function(f){function h(){var a=this,f=a.data,c=a.chart,g=a.options.dataLabels||{},b=g.connectorPadding,h=c.plotWidth,l=c.plotHeight,n=c.plotLeft,p=Math.round(c.chartWidth/3),t=a.center,u=t[2]/2,v=t[1],A=[[],[]],w=[0,0,0,0],y=a.dataLabelPositioners,F,C,G,H,M,E,T,N,U,V,X,S;a.visible&&(g.enabled||a._hasPointLabels)&&(f.forEach(function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),B.prototype.drawDataLabels.apply(a),
|
||||
f.forEach(function(a){a.dataLabel&&(a.visible?(A[a.half].push(a),a.dataLabel._pos=null,!m(g.style.width)&&!m(a.options.dataLabels&&a.options.dataLabels.style&&a.options.dataLabels.style.width)&&a.dataLabel.getBBox().width>p&&(a.dataLabel.css({width:Math.round(.7*p)+"px"}),a.dataLabel.shortened=!0)):(a.dataLabel=a.dataLabel.destroy(),a.dataLabels&&1===a.dataLabels.length&&delete a.dataLabels))}),A.forEach(function(e,f){var k=e.length,q=[],p;if(k){a.sortByAngle(e,f-.5);if(0<a.maxLabelDistance){var r=
|
||||
Math.max(0,v-u-a.maxLabelDistance);var A=Math.min(v+u+a.maxLabelDistance,c.plotHeight);e.forEach(function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,v-u-a.labelDistance),a.bottom=Math.min(v+u+a.labelDistance,c.plotHeight),p=a.dataLabel.getBBox().height||21,a.distributeBox={target:a.labelPosition.natural.y-a.top+p/2,size:p,rank:a.y},q.push(a.distributeBox))});r=A+p-r;I(q,r,r/5)}for(X=0;X<k;X++){F=e[X];E=F.labelPosition;H=F.dataLabel;V=!1===F.visible?"hidden":"inherit";U=r=E.natural.y;q&&
|
||||
m(F.distributeBox)&&("undefined"===typeof F.distributeBox.pos?V="hidden":(T=F.distributeBox.size,U=y.radialDistributionY(F)));delete F.positionIndex;if(g.justify)N=y.justify(F,u,t);else switch(g.alignTo){case "connectors":N=y.alignToConnectors(e,f,h,n);break;case "plotEdges":N=y.alignToPlotEdges(H,f,h,n);break;default:N=y.radialDistributionX(a,F,U,r)}H._attr={visibility:V,align:E.alignment};S=F.options.dataLabels||{};H._pos={x:N+d(S.x,g.x)+({left:b,right:-b}[E.alignment]||0),y:U+d(S.y,g.y)-10};E.final.x=
|
||||
N;E.final.y=U;d(g.crop,!0)&&(M=H.getBBox().width,r=null,N-M<b&&1===f?(r=Math.round(M-N+b),w[3]=Math.max(r,w[3])):N+M>h-b&&0===f&&(r=Math.round(N+M-h+b),w[1]=Math.max(r,w[1])),0>U-T/2?w[0]=Math.max(Math.round(-U+T/2),w[0]):U+T/2>l&&(w[2]=Math.max(Math.round(U+T/2-l),w[2])),H.sideOverflow=r)}}}),0===z(w)||this.verifyDataLabelOverflow(w))&&(this.placeDataLabels(),this.points.forEach(function(b){S=e(g,b.options.dataLabels);if(C=d(S.connectorWidth,1)){var f;G=b.connector;if((H=b.dataLabel)&&H._pos&&b.visible&&
|
||||
0<b.labelDistance){V=H._attr.visibility;if(f=!G)b.connector=G=c.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+b.colorIndex+(b.className?" "+b.className:"")).add(a.dataLabelsGroup),c.styledMode||G.attr({"stroke-width":C,stroke:S.connectorColor||b.color||"#666666"});G[f?"attr":"animate"]({d:b.getConnectorPath()});G.attr("visibility",V)}else G&&(b.connector=G.destroy())}}))}function t(){this.points.forEach(function(a){var d=a.dataLabel,c;d&&a.visible&&((c=d._pos)?(d.sideOverflow&&
|
||||
(d._attr.width=Math.max(d.getBBox().width-d.sideOverflow,0),d.css({width:d._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),d.shortened=!0),d.attr(d._attr),d[d.moved?"animate":"attr"](c),d.moved=!0):d&&d.attr({y:-9999}));delete a.distributeBox},this)}function u(a){var d=this.center,c=this.options,e=c.center,b=c.minSize||80,f=null!==c.size;if(!f){if(null!==e[0])var h=Math.max(d[2]-Math.max(a[1],a[3]),b);else h=Math.max(d[2]-a[1]-a[3],b),d[0]+=(a[3]-a[1])/
|
||||
2;null!==e[1]?h=p(h,b,d[2]-Math.max(a[0],a[2])):(h=p(h,b,d[2]-a[0]-a[2]),d[1]+=(a[0]-a[2])/2);h<d[2]?(d[2]=h,d[3]=Math.min(l(c.innerSize||0,h),h),this.translate(d),this.drawDataLabels&&this.drawDataLabels()):f=!0}return f}var y=[],A={radialDistributionY:function(a){return a.top+a.distributeBox.pos},radialDistributionX:function(a,d,c,e){return a.getX(c<d.top+2||c>d.bottom-2?e:c,d.half,d)},justify:function(a,d,c){return c[0]+(a.half?-1:1)*(d+a.labelDistance)},alignToPlotEdges:function(a,d,c,e){a=a.getBBox().width;
|
||||
return d?a+e:c-a-e},alignToConnectors:function(a,d,c,e){var b=0,f;a.forEach(function(a){f=a.dataLabel.getBBox().width;f>b&&(b=f)});return d?b+e:c-b-e}};f.compose=function(d){a.compose(B);-1===y.indexOf(d)&&(y.push(d),d=d.prototype,d.dataLabelPositioners=A,d.alignDataLabel=F,d.drawDataLabels=h,d.placeDataLabels=t,d.verifyDataLabelOverflow=u)}})(h||(h={}));return h});M(f,"Extensions/OverlappingDataLabels.js",[f["Core/Chart/Chart.js"],f["Core/Utilities.js"]],function(a,f){function F(a,f){var e=!1;if(a){var d=
|
||||
a.newOpacity;a.oldOpacity!==d&&(a.alignAttr&&a.placed?(a[d?"removeClass":"addClass"]("highcharts-data-label-hidden"),e=!0,a.alignAttr.opacity=d,a[a.isOld?"animate":"attr"](a.alignAttr,null,function(){f.styledMode||a.css({pointerEvents:d?"auto":"none"})}),u(f,"afterHideOverlappingLabel")):a.attr({opacity:d}));a.isOld=!0}return e}var G=f.addEvent,u=f.fireEvent,H=f.isArray,I=f.isNumber,B=f.objectEach,z=f.pick;G(a,"render",function(){var a=this,f=[];(this.labelCollectors||[]).forEach(function(a){f=f.concat(a())});
|
||||
(this.yAxis||[]).forEach(function(a){a.stacking&&a.options.stackLabels&&!a.options.stackLabels.allowOverlap&&B(a.stacking.stacks,function(a){B(a,function(a){a.label&&"hidden"!==a.label.visibility&&f.push(a.label)})})});(this.series||[]).forEach(function(e){var d=e.options.dataLabels;e.visible&&(!1!==d.enabled||e._hasPointLabels)&&(d=function(d){return d.forEach(function(d){d.visible&&(H(d.dataLabels)?d.dataLabels:d.dataLabel?[d.dataLabel]:[]).forEach(function(e){var h=e.options;e.labelrank=z(h.labelrank,
|
||||
d.labelrank,d.shapeArgs&&d.shapeArgs.height);h.allowOverlap?(e.oldOpacity=e.opacity,e.newOpacity=1,F(e,a)):f.push(e)})})},d(e.nodes||[]),d(e.points))});this.hideOverlappingLabels(f)});a.prototype.hideOverlappingLabels=function(a){var f=this,e=a.length,d=f.renderer,l,h,p,n=!1;var v=function(a){var e,f=a.box?0:a.padding||0,c=e=0,g;if(a&&(!a.alignAttr||a.placed)){var b=a.alignAttr||{x:a.attr("x"),y:a.attr("y")};var h=a.parentGroup;a.width||(e=a.getBBox(),a.width=e.width,a.height=e.height,e=d.fontMetrics(null,
|
||||
a.element).h);var l=a.width-2*f;(g={left:"0",center:"0.5",right:"1"}[a.alignValue])?c=+g*l:I(a.x)&&Math.round(a.x)!==a.translateX&&(c=a.x-a.translateX);return{x:b.x+(h.translateX||0)+f-(c||0),y:b.y+(h.translateY||0)+f-e,width:a.width-2*f,height:a.height-2*f}}};for(h=0;h<e;h++)if(l=a[h])l.oldOpacity=l.opacity,l.newOpacity=1,l.absoluteBox=v(l);a.sort(function(a,d){return(d.labelrank||0)-(a.labelrank||0)});for(h=0;h<e;h++){var w=(v=a[h])&&v.absoluteBox;for(l=h+1;l<e;++l){var y=(p=a[l])&&p.absoluteBox;
|
||||
!w||!y||v===p||0===v.newOpacity||0===p.newOpacity||y.x>=w.x+w.width||y.x+y.width<=w.x||y.y>=w.y+w.height||y.y+y.height<=w.y||((v.labelrank<p.labelrank?v:p).newOpacity=0)}}a.forEach(function(a){F(a,f)&&(n=!0)});n&&u(f,"afterHideAllOverlappingLabels")}});M(f,"Core/Responsive.js",[f["Core/Utilities.js"]],function(a){var f=a.extend,C=a.find,G=a.isArray,u=a.isObject,H=a.merge,I=a.objectEach,B=a.pick,z=a.splat,p=a.uniqueKey,m;(function(a){var d=[];a.compose=function(a){-1===d.indexOf(a)&&(d.push(a),f(a.prototype,
|
||||
e.prototype));return a};var e=function(){function a(){}a.prototype.currentOptions=function(a){function d(a,f,h,k){var c;I(a,function(a,b){if(!k&&-1<e.collectionsWithUpdate.indexOf(b)&&f[b])for(a=z(a),h[b]=[],c=0;c<Math.max(a.length,f[b].length);c++)f[b][c]&&(void 0===a[c]?h[b][c]=f[b][c]:(h[b][c]={},d(a[c],f[b][c],h[b][c],k+1)));else u(a)?(h[b]=G(a)?[]:{},d(a,f[b]||{},h[b],k+1)):h[b]="undefined"===typeof f[b]?null:f[b]})}var e=this,f={};d(a,this.options,f,0);return f};a.prototype.matchResponsiveRule=
|
||||
function(a,d){var e=a.condition;(e.callback||function(){return this.chartWidth<=B(e.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=B(e.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=B(e.minWidth,0)&&this.chartHeight>=B(e.minHeight,0)}).call(this)&&d.push(a._id)};a.prototype.setResponsive=function(a,d){var e=this,f=this.options.responsive,h=this.currentResponsive,l=[];!d&&f&&f.rules&&f.rules.forEach(function(a){"undefined"===typeof a._id&&(a._id=p());e.matchResponsiveRule(a,l)},this);d=H.apply(void 0,
|
||||
l.map(function(a){return C((f||{}).rules||[],function(d){return d._id===a})}).map(function(a){return a&&a.chartOptions}));d.isResponsiveOptions=!0;l=l.toString()||void 0;l!==(h&&h.ruleIds)&&(h&&this.update(h.undoOptions,a,!0),l?(h=this.currentOptions(d),h.isResponsiveOptions=!0,this.currentResponsive={ruleIds:l,mergedOptions:d,undoOptions:h},this.update(d,a,!0)):this.currentResponsive=void 0)};return a}()})(m||(m={}));"";"";return m});M(f,"masters/highcharts.src.js",[f["Core/Globals.js"],f["Core/Utilities.js"],
|
||||
f["Core/DefaultOptions.js"],f["Core/Animation/Fx.js"],f["Core/Animation/AnimationUtilities.js"],f["Core/Renderer/HTML/AST.js"],f["Core/FormatUtilities.js"],f["Core/Renderer/RendererUtilities.js"],f["Core/Renderer/SVG/SVGElement.js"],f["Core/Renderer/SVG/SVGRenderer.js"],f["Core/Renderer/HTML/HTMLElement.js"],f["Core/Renderer/HTML/HTMLRenderer.js"],f["Core/Axis/Axis.js"],f["Core/Axis/DateTimeAxis.js"],f["Core/Axis/LogarithmicAxis.js"],f["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],f["Core/Axis/Tick.js"],
|
||||
f["Core/Tooltip.js"],f["Core/Series/Point.js"],f["Core/Pointer.js"],f["Core/MSPointer.js"],f["Core/Legend/Legend.js"],f["Core/Chart/Chart.js"],f["Core/Series/Series.js"],f["Core/Series/SeriesRegistry.js"],f["Series/Column/ColumnSeries.js"],f["Series/Column/ColumnDataLabel.js"],f["Series/Pie/PieSeries.js"],f["Series/Pie/PieDataLabel.js"],f["Core/Series/DataLabel.js"],f["Core/Responsive.js"],f["Core/Color/Color.js"],f["Core/Time.js"]],function(a,f,C,G,u,H,I,B,z,p,m,e,d,l,h,t,n,v,w,y,A,q,k,c,g,b,r,x,
|
||||
D,K,M,Q,O){a.animate=u.animate;a.animObject=u.animObject;a.getDeferredAnimation=u.getDeferredAnimation;a.setAnimation=u.setAnimation;a.stop=u.stop;a.timers=G.timers;a.AST=H;a.Axis=d;a.Chart=k;a.chart=k.chart;a.Fx=G;a.Legend=q;a.PlotLineOrBand=t;a.Point=w;a.Pointer=A.isRequired()?A:y;a.Series=c;a.SVGElement=z;a.SVGRenderer=p;a.Tick=n;a.Time=O;a.Tooltip=v;a.Color=Q;a.color=Q.parse;e.compose(p);m.compose(z);a.defaultOptions=C.defaultOptions;a.getOptions=C.getOptions;a.time=C.defaultTime;a.setOptions=
|
||||
C.setOptions;a.dateFormat=I.dateFormat;a.format=I.format;a.numberFormat=I.numberFormat;a.addEvent=f.addEvent;a.arrayMax=f.arrayMax;a.arrayMin=f.arrayMin;a.attr=f.attr;a.clearTimeout=f.clearTimeout;a.correctFloat=f.correctFloat;a.createElement=f.createElement;a.css=f.css;a.defined=f.defined;a.destroyObjectProperties=f.destroyObjectProperties;a.discardElement=f.discardElement;a.distribute=B.distribute;a.erase=f.erase;a.error=f.error;a.extend=f.extend;a.extendClass=f.extendClass;a.find=f.find;a.fireEvent=
|
||||
f.fireEvent;a.getMagnitude=f.getMagnitude;a.getStyle=f.getStyle;a.inArray=f.inArray;a.isArray=f.isArray;a.isClass=f.isClass;a.isDOMElement=f.isDOMElement;a.isFunction=f.isFunction;a.isNumber=f.isNumber;a.isObject=f.isObject;a.isString=f.isString;a.keys=f.keys;a.merge=f.merge;a.normalizeTickInterval=f.normalizeTickInterval;a.objectEach=f.objectEach;a.offset=f.offset;a.pad=f.pad;a.pick=f.pick;a.pInt=f.pInt;a.relativeLength=f.relativeLength;a.removeEvent=f.removeEvent;a.seriesType=g.seriesType;a.splat=
|
||||
f.splat;a.stableSort=f.stableSort;a.syncTimeout=f.syncTimeout;a.timeUnits=f.timeUnits;a.uniqueKey=f.uniqueKey;a.useSerialIds=f.useSerialIds;a.wrap=f.wrap;r.compose(b);K.compose(c);l.compose(d);h.compose(d);D.compose(x);t.compose(d);M.compose(k);return a});f["masters/highcharts.src.js"]._modules=f;return f["masters/highcharts.src.js"]});
|
||||
//# sourceMappingURL=highcharts.js.map
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Highcharts plugin for creating individual rounded corners.
|
||||
*
|
||||
* Author: Torstein Honsi
|
||||
* Version: 1.0.5
|
||||
* License: MIT License
|
||||
*/
|
||||
(function(factory){if(typeof module==="object"&&module.exports){module.exports=factory}else{factory(Highcharts)}}(function(H){var rel=H.relativeLength;H.wrap(H.seriesTypes.column.prototype,"translate",function(proceed){var options=this.options,topMargin=options.topMargin||0,bottomMargin=options.bottomMargin||0;proceed.call(this);this.points.forEach(function(point){var shapeArgs=point.shapeArgs,w=shapeArgs.width,h=shapeArgs.height,x=shapeArgs.x,y=shapeArgs.y;var rTopLeft=rel(options.borderRadiusTopLeft||0,w),rTopRight=rel(options.borderRadiusTopRight||0,w),rBottomRight=rel(options.borderRadiusBottomRight||0,w),rBottomLeft=rel(options.borderRadiusBottomLeft||0,w);if(rTopLeft||rTopRight||rBottomRight||rBottomLeft){var maxR=Math.min(w,h)/2;if(rTopLeft>maxR){rTopLeft=maxR}if(rTopRight>maxR){rTopRight=maxR}if(rBottomRight>maxR){rBottomRight=maxR}if(rBottomLeft>maxR){rBottomLeft=maxR}point.dlBox=point.shapeArgs;point.shapeType="path";point.shapeArgs={d:[["M",x+rTopLeft,y+topMargin],["L",x+w-rTopRight,y+topMargin],["C",x+w-rTopRight/2,y,x+w,y+rTopRight/2,x+w,y+rTopRight],["L",x+w,y+h-rBottomRight],["C",x+w,y+h-rBottomRight/2,x+w-rBottomRight/2,y+h,x+w-rBottomRight,y+h+bottomMargin],["L",x+rBottomLeft,y+h+bottomMargin],["C",x+rBottomLeft/2,y+h,x,y+h-rBottomLeft/2,x,y+h-rBottomLeft],["L",x,y+rTopLeft],["C",x,y+rTopLeft/2,x+rTopLeft/2,y,x+rTopLeft,y],["Z"]]}}})})}));
|
||||
+484
@@ -0,0 +1,484 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
|
||||
package com.github.aachartmodel.aainfographics.aachartcreator
|
||||
|
||||
import android.content.Context
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.AAScrollablePlotArea
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.AAStyle
|
||||
import com.github.aachartmodel.aainfographics.aatools.AABuilder
|
||||
|
||||
enum class AAChartAnimationType(val value: String) {
|
||||
Linear("Linear"),
|
||||
EaseInQuad("easeInQuad"),
|
||||
EaseOutQuad("easeOutQuad"),
|
||||
EaseInOutQuad("easeInOutQuad"),
|
||||
EaseInCubic("easeInCubic"),
|
||||
EaseOutCubic("easeOutCubic"),
|
||||
EaseInOutCubic("easeInOutCubic"),
|
||||
EaseInQuart("easeInQuart"),
|
||||
EaseOutQuart("easeOutQuart"),
|
||||
EaseInOutQuart("easeInOutQuart"),
|
||||
EaseInQuint("easeInQuint"),
|
||||
EaseOutQuint("easeOutQuint"),
|
||||
EaseInOutQuint("easeInOutQuint"),
|
||||
EaseInSine("easeInSine"),
|
||||
EaseOutSine("easeOutSine"),
|
||||
EaseInOutSine("easeInOutSine"),
|
||||
EaseInExpo("easeInExpo"),
|
||||
EaseOutExpo("easeOutExpo"),
|
||||
EaseInOutExpo("easeInOutExpo"),
|
||||
EaseInCirc("easeInCirc"),
|
||||
EaseOutCirc("easeOutCirc"),
|
||||
EaseInOutCirc("easeInOutCirc"),
|
||||
EaseOutBounce("easeOutBounce"),
|
||||
EaseInBack("easeInBack"),
|
||||
EaseOutBack("easeOutBack"),
|
||||
EaseInOutBack("easeInOutBack"),
|
||||
Elastic("elastic"),
|
||||
SwingFromTo("swingFromTo"),
|
||||
SwingFrom("swingFrom"),
|
||||
SwingTo("swingTo"),
|
||||
Bounce("bounce"),
|
||||
BouncePast("bouncePast"),
|
||||
EaseFromTo("easeFromTo"),
|
||||
EaseFrom("easeFrom"),
|
||||
EaseTo("easeTo"),
|
||||
}
|
||||
|
||||
enum class AAChartType(val value: String) {
|
||||
Column("column"), //Column series display one column per value along an X axis.
|
||||
Bar("bar"), //A bar series is a special type of column series where the columns are horizontal.
|
||||
Area("area"), //The area series type.
|
||||
Areaspline("areaspline"), //The area spline series is an area series where the graph between the points is smoothed into a spline.
|
||||
Line("line"), //A line series displays information as a series of data points connected by straight line segments.
|
||||
Spline("spline"), //A spline series is a special type of line series, where the segments between the data points are smoothed.
|
||||
Scatter("scatter"), //A scatter plot uses cartesian coordinates to display values for two variables for a set of data.
|
||||
Pie("pie"), //A pie chart is a circular graphic which is divided into slices to illustrate numerical proportion.
|
||||
Bubble("bubble"), //A bubble series is a three dimensional series type where each point renders an X, Y and Z value. Each points is drawn as a bubble where the position along the X and Y axes mark the X and Y values, and the size of the bubble relates to the Z value.
|
||||
Pyramid("pyramid"), //A pyramid series is a special type of funnel, without neck and reversed by default.
|
||||
Funnel("funnel"), //Funnel charts are a type of chart often used to visualize stages in a sales project, where the top are the initial stages with the most clients. It requires that the modules/funnel.js file is loaded.
|
||||
Columnrange("columnrange"), //The column range is a cartesian series type with higher and lower Y values along an X axis. To display horizontal bars, set chart.inverted to true.
|
||||
Arearange("arearange"), //The area range series is a carteseian series with higher and lower values for each point along an X axis, where the area between the values is shaded.
|
||||
Areasplinerange("areasplinerange"), //The area spline range is a cartesian series type with higher and lower Y values along an X axis. The area inside the range is colored, and the graph outlining the area is a smoothed spline.
|
||||
Boxplot("boxplot"), //A box plot is a convenient way of depicting groups of data through their five-number summaries: the smallest observation (sample minimum), lower quartile (Q1), median (Q2), upper quartile (Q3), and largest observation (sample maximum).
|
||||
Waterfall("waterfall"), //A waterfall chart displays sequentially introduced positive or negative values in cumulative columns.
|
||||
Polygon("polygon"), //A polygon series can be used to draw any freeform shape in the cartesian coordinate system. A fill is applied with the color option, and stroke is applied through lineWidth and lineColor options.
|
||||
Gauge("gauge"), //Gauges are circular plots displaying one or more values with a dial pointing to values along the perimeter.
|
||||
Errorbar("errorbar"), //Error bars are a graphical representation of the variability of data and are used on graphs to indicate the error, or uncertainty in a reported measurement.
|
||||
}
|
||||
|
||||
enum class AAChartZoomType(val value: String) {
|
||||
None("none"),
|
||||
X("x"),
|
||||
Y("y"),
|
||||
XY("xy"),
|
||||
}
|
||||
|
||||
enum class AAChartStackingType(val value: String) {
|
||||
False(""),
|
||||
Normal("normal"),
|
||||
Percent("percent"),
|
||||
}
|
||||
|
||||
enum class AAChartSymbolType(val value: String) {
|
||||
Circle("circle"), //◉ ◉ ◉
|
||||
Square("square"), //■ ■ ■
|
||||
Diamond("diamond"), //◆ ◆ ◆
|
||||
Triangle("triangle"), //▲ ▲ ▲
|
||||
TriangleDown("triangle-down"), //▼ ▼ ▼
|
||||
}
|
||||
|
||||
enum class AAChartSymbolStyleType(val value: String) {
|
||||
Normal("normal"),
|
||||
InnerBlank("innerBlank"),
|
||||
BorderBlank("borderBlank"),
|
||||
}
|
||||
|
||||
enum class AAChartLayoutType(val value: String) {
|
||||
Horizontal("horizontal"),
|
||||
Vertical("vertical"),
|
||||
}
|
||||
|
||||
enum class AAChartAlignType(val value: String) {
|
||||
Left("left"),
|
||||
Center("center"),
|
||||
Right("right"),
|
||||
}
|
||||
|
||||
enum class AAChartVerticalAlignType(val value: String) {
|
||||
Top("top"),
|
||||
Middle("middle"),
|
||||
Bottom("bottom"),
|
||||
}
|
||||
|
||||
enum class AAChartLineDashStyleType(val value: String) {
|
||||
Solid("Solid"), //———————————————————————————————————
|
||||
ShortDash("ShortDash"), //— — — — — — — — — — — — — — — — — —
|
||||
ShortDot("ShortDot"), //ⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈⵈ
|
||||
ShortDashDot("ShortDashDot"), //—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧—‧
|
||||
ShortDashDotDot("ShortDashDotDot"), //—‧‧—‧‧—‧‧—‧‧—‧‧—‧‧—‧‧—‧‧—‧‧—‧‧—‧‧—‧‧
|
||||
Dot("Dot"), //‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧
|
||||
Dash("Dash"), //—— —— —— —— —— —— —— —— —— —— —— ——
|
||||
LongDash("LongDash"), //——— ——— ——— ——— ——— ——— ——— ——— ———
|
||||
DashDot("DashDot"), //——‧——‧——‧——‧——‧——‧——‧——‧——‧——‧——‧——‧
|
||||
LongDashDot("LongDashDot"), //———‧———‧———‧———‧———‧———‧———‧———‧———‧
|
||||
LongDashDotDot("LongDashDotDot"), //———‧‧———‧‧———‧‧———‧‧———‧‧———‧‧———‧‧
|
||||
}
|
||||
|
||||
enum class AAChartFontWeightType(val value: String) {
|
||||
Thin("thin"),
|
||||
Regular("regular"),
|
||||
Bold("bold"),
|
||||
}
|
||||
|
||||
/**
|
||||
* @param animationType 动画类型
|
||||
* @param animationDuration 动画时间
|
||||
* @param title 标题内容
|
||||
* @param titleStyle 标题文本风格样式
|
||||
* @param subtitle 副标题内容
|
||||
* @param subtitleAlign
|
||||
* @param subtitleStyle 副标题文本风格样式
|
||||
* @param axesTextColor x 轴和 y 轴文字颜色
|
||||
* @param chartType 图表类型
|
||||
* @param stacking 堆积样式
|
||||
* @param markerRadius 折线连接点的半径长度,如果值设置为0,这样就相当于不显示了
|
||||
* @param markerSymbol 折线曲线连接点的类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
||||
* @param markerSymbolStyle
|
||||
* @param zoomType 缩放类型 AAChartZoomTypeX表示可沿着 x 轴进行手势缩放
|
||||
* @param inverted x 轴是否翻转(垂直)
|
||||
* @param xAxisReversed x 轴翻转
|
||||
* @param yAxisReversed y 轴翻转
|
||||
* @param tooltipEnabled 是否显示浮动提示框(默认显示)
|
||||
* @param tooltipValueSuffix 浮动提示框单位后缀
|
||||
* @param gradientColorEnable 是否要为渐变色
|
||||
* @param polar 是否极化图形(变为雷达图)
|
||||
* @param margin 图表外边缘和绘图区域之间的边距
|
||||
* @param dataLabelsEnabled 是否显示数据
|
||||
* @param dataLabelsStyle
|
||||
* @param xAxisLabelsEnabled x轴是否显示数据
|
||||
* @param xAxisTickInterval
|
||||
* @param categories x轴是否显示数据
|
||||
* @param xAxisGridLineWidth x轴网格线的宽度
|
||||
* @param xAxisVisible x 轴是否显示
|
||||
* @param yAxisVisible y 轴是否显示
|
||||
* @param yAxisLabelsEnabled y轴是否显示数据
|
||||
* @param yAxisTitle y轴标题
|
||||
* @param yAxisLineWidth y 轴轴线的宽度
|
||||
* @param yAxisMin
|
||||
* @param yAxisMax
|
||||
* @param yAxisAllowDecimals
|
||||
* @param yAxisGridLineWidth y轴网格线的宽度
|
||||
* @param colorsTheme 图表主题颜色数组
|
||||
* @param legendEnabled 是否显示图例
|
||||
* @param backgroundColor 图表背景色
|
||||
* @param borderRadius 柱状图长条图头部圆角半径(可用于设置头部的形状,仅对条形图,柱状图有效,设置为1000时,柱形图或者条形图头部为楔形)
|
||||
* @param series
|
||||
* @param touchEventEnabled 是否支持用户触摸事件
|
||||
* @param scrollablePlotArea
|
||||
*/
|
||||
class AAChartModel(
|
||||
var animationType: AAChartAnimationType? = AAChartAnimationType.Linear,
|
||||
var animationDuration: Int? = 500,
|
||||
var title: String? = "",
|
||||
var titleStyle: AAStyle? = null,
|
||||
var subtitle: String? = "",
|
||||
var subtitleAlign: AAChartAlignType? = null,
|
||||
var subtitleStyle: AAStyle? = null,
|
||||
var axesTextColor: String? = null,
|
||||
var chartType: AAChartType? = AAChartType.Line,
|
||||
var stacking: AAChartStackingType? = AAChartStackingType.False,
|
||||
var markerRadius: Number? = 6f,
|
||||
var markerSymbol: AAChartSymbolType? = null,
|
||||
var markerSymbolStyle: AAChartSymbolStyleType? = AAChartSymbolStyleType.Normal,
|
||||
var zoomType: AAChartZoomType? = AAChartZoomType.None,
|
||||
var inverted: Boolean? = false,
|
||||
var xAxisReversed: Boolean? = false,
|
||||
var yAxisReversed: Boolean? = false,
|
||||
var tooltipEnabled: Boolean? = null,
|
||||
var tooltipValueSuffix: String? = null,
|
||||
var gradientColorEnable: Boolean? = false,
|
||||
var polar: Boolean? = false,
|
||||
var margin: Array<Number>? = null,
|
||||
var dataLabelsEnabled: Boolean? = false,
|
||||
var dataLabelsStyle: AAStyle? = null,
|
||||
var xAxisLabelsEnabled: Boolean? = true,
|
||||
var xAxisTickInterval: Int? = null,
|
||||
var categories: Array<String>? = null,
|
||||
var xAxisGridLineWidth: Number? = 0f,
|
||||
var xAxisVisible: Boolean? = null,
|
||||
var yAxisVisible: Boolean? = null,
|
||||
var yAxisLabelsEnabled: Boolean? = true,
|
||||
var yAxisTitle: String? = null,
|
||||
var yAxisLineWidth: Number? = null,
|
||||
var yAxisMin: Number? = null,
|
||||
var yAxisMax: Number? = null,
|
||||
var yAxisAllowDecimals: Boolean? = null,
|
||||
var yAxisGridLineWidth: Number? = 1f,
|
||||
var colorsTheme: Array<Any>? = arrayOf("#fe117c", "#ffc069", "#06caf4", "#7dffc0"),
|
||||
var legendEnabled: Boolean? = true,
|
||||
var backgroundColor: Any? = "#ffffff",
|
||||
var borderRadius: Number? = 0f,
|
||||
var series: Array<Any>? = null,
|
||||
var touchEventEnabled: Boolean? = null,
|
||||
var scrollablePlotArea: AAScrollablePlotArea? = null
|
||||
) {
|
||||
|
||||
fun animationType(prop: AAChartAnimationType): AAChartModel {
|
||||
animationType = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun animationDuration(prop: Int?): AAChartModel {
|
||||
animationDuration = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun title(prop: String): AAChartModel {
|
||||
title = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun titleStyle(prop: AAStyle): AAChartModel {
|
||||
titleStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun subtitle(prop: String): AAChartModel {
|
||||
subtitle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun subtitleAlign(prop: AAChartAlignType): AAChartModel {
|
||||
subtitleAlign = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun subtitleStyle(prop: AAStyle): AAChartModel {
|
||||
subtitleStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun axesTextColor(prop: String): AAChartModel {
|
||||
axesTextColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun chartType(prop: AAChartType): AAChartModel {
|
||||
chartType = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun stacking(prop: AAChartStackingType): AAChartModel {
|
||||
stacking = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun markerRadius(prop: Number?): AAChartModel {
|
||||
markerRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun markerSymbol(prop: AAChartSymbolType): AAChartModel {
|
||||
markerSymbol = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun markerSymbolStyle(prop: AAChartSymbolStyleType): AAChartModel {
|
||||
markerSymbolStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun zoomType(prop: AAChartZoomType): AAChartModel {
|
||||
zoomType = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun inverted(prop: Boolean?): AAChartModel {
|
||||
inverted = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun xAxisReversed(prop: Boolean?): AAChartModel {
|
||||
xAxisReversed = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisReversed(prop: Boolean?): AAChartModel {
|
||||
yAxisReversed = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tooltipEnabled(prop: Boolean?): AAChartModel {
|
||||
tooltipEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tooltipValueSuffix(prop: String?): AAChartModel {
|
||||
tooltipValueSuffix = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gradientColorEnable(prop: Boolean?): AAChartModel {
|
||||
gradientColorEnable = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun polar(prop: Boolean?): AAChartModel {
|
||||
polar = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun margin(prop: Array<Number>?): AAChartModel {
|
||||
margin = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabelsEnabled(prop: Boolean?): AAChartModel {
|
||||
dataLabelsEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabelsStyle(prop: AAStyle): AAChartModel {
|
||||
dataLabelsStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun xAxisLabelsEnabled(prop: Boolean?): AAChartModel {
|
||||
xAxisLabelsEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun xAxisTickInterval(prop: Int?): AAChartModel {
|
||||
xAxisTickInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun categories(prop: Array<String>): AAChartModel {
|
||||
categories = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun xAxisGridLineWidth(prop: Number?): AAChartModel {
|
||||
xAxisGridLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisGridLineWidth(prop: Number?): AAChartModel {
|
||||
yAxisGridLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun xAxisVisible(prop: Boolean?): AAChartModel {
|
||||
xAxisVisible = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisVisible(prop: Boolean?): AAChartModel {
|
||||
yAxisVisible = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisLabelsEnabled(prop: Boolean?): AAChartModel {
|
||||
yAxisLabelsEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisTitle(prop: String): AAChartModel {
|
||||
yAxisTitle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisLineWidth(prop: Number?): AAChartModel {
|
||||
yAxisLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisMin(prop: Number?): AAChartModel {
|
||||
yAxisMin = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisMax(prop: Number?): AAChartModel {
|
||||
yAxisMax = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisAllowDecimals(prop: Boolean?): AAChartModel {
|
||||
yAxisAllowDecimals = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun colorsTheme(prop: Array<Any>): AAChartModel {
|
||||
colorsTheme = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun legendEnabled(prop: Boolean?): AAChartModel {
|
||||
legendEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun backgroundColor(prop: Any): AAChartModel {
|
||||
backgroundColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadius(prop: Number?): AAChartModel {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun series(prop: Array<Any>): AAChartModel {
|
||||
series = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun touchEventEnabled(prop: Boolean?): AAChartModel {
|
||||
touchEventEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun scrollablePlotArea(prop: AAScrollablePlotArea): AAChartModel {
|
||||
scrollablePlotArea = prop
|
||||
return this
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun Builder(context: Context): AABuilder {
|
||||
return AABuilder(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun AAChartModel.aa_toAAOptions(): AAOptions {
|
||||
return AAOptionsConstructor.configureChartOptions(this)
|
||||
}
|
||||
+346
@@ -0,0 +1,346 @@
|
||||
/**
|
||||
// AAChartModel.java
|
||||
// AAChartCore-Kotlin
|
||||
//
|
||||
// Created by AnAn on 2017/9/8..
|
||||
// Copyright © 2018年 An An. All rights reserved.
|
||||
*/
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
|
||||
package com.github.aachartmodel.aainfographics.aachartcreator
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.AlertDialog
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.webkit.*
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.internal.LinkedTreeMap
|
||||
import java.util.*
|
||||
import kotlin.collections.HashMap
|
||||
|
||||
|
||||
class AAMoveOverEventMessageModel {
|
||||
var name: String? = null
|
||||
var x: Double? = null
|
||||
var y: Double? = null
|
||||
var category: String? = null
|
||||
var offset: LinkedTreeMap<String, Any>? = null
|
||||
var index: Int? = null
|
||||
}
|
||||
|
||||
|
||||
class AAChartView : WebView {
|
||||
interface AAChartViewCallBack {
|
||||
fun chartViewDidFinishLoad(aaChartView: AAChartView)
|
||||
fun chartViewMoveOverEventMessage(
|
||||
aaChartView: AAChartView,
|
||||
messageModel: AAMoveOverEventMessageModel
|
||||
)
|
||||
}
|
||||
|
||||
var contentWidth: Number? = null
|
||||
set(value) {
|
||||
field = value
|
||||
val jsStr = "setTheChartViewContentWidth('$field')"
|
||||
safeEvaluateJavaScriptString(jsStr)
|
||||
}
|
||||
var contentHeight: Number? = null
|
||||
set(value) {
|
||||
field = value
|
||||
val jsStr = "setTheChartViewContentHeight('$field')"
|
||||
safeEvaluateJavaScriptString(jsStr)
|
||||
}
|
||||
var chartSeriesHidden: Boolean? = null
|
||||
set(value) {
|
||||
field = value
|
||||
val jsStr = "setChartSeriesHidden('$field')"
|
||||
safeEvaluateJavaScriptString(jsStr)
|
||||
}
|
||||
var isClearBackgroundColor: Boolean? = null
|
||||
set(value) {
|
||||
field = value
|
||||
if (field == true) {
|
||||
setBackgroundColor(0)
|
||||
background?.alpha = 0
|
||||
} else {
|
||||
setBackgroundColor(1)
|
||||
background?.alpha = 255
|
||||
}
|
||||
}
|
||||
var callBack: AAChartViewCallBack? = null
|
||||
|
||||
|
||||
private var optionsJson: String? = null
|
||||
|
||||
constructor(
|
||||
context: Context
|
||||
) : super(context) {
|
||||
setupBasicContent()
|
||||
}
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet?
|
||||
) : super(context, attrs) {
|
||||
setupBasicContent()
|
||||
}
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet?,
|
||||
defStyleAttr: Int
|
||||
) : super(context, attrs, defStyleAttr) {
|
||||
setupBasicContent()
|
||||
}
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
private fun setupBasicContent() { // Do some initialize work.
|
||||
if (isInEditMode) return
|
||||
contentWidth = 420f
|
||||
contentHeight = 580f
|
||||
isClearBackgroundColor = false
|
||||
settings.javaScriptEnabled = true
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
setWebContentsDebuggingEnabled(true)
|
||||
}
|
||||
//把当前对象作为androidObject别名传递给js
|
||||
//js通过window.androidObject.androidMethod()就可以直接调用安卓的androidMethod方法
|
||||
addJavascriptInterface(this, "androidObject")
|
||||
}
|
||||
|
||||
//js调用安卓,必须加@JavascriptInterface注释的方法才可以被js调用
|
||||
@JavascriptInterface
|
||||
fun androidMethod(message: String?): String {
|
||||
var messageBody = HashMap<String, Any>()
|
||||
messageBody = Gson().fromJson(message, messageBody.javaClass)
|
||||
val eventMessageModel: AAMoveOverEventMessageModel = getEventMessageModel(messageBody)
|
||||
callBack?.chartViewMoveOverEventMessage(this, eventMessageModel)
|
||||
//Log.i("androidMethod","++++++++++++++++显示总共调用了几次");
|
||||
return ""
|
||||
}
|
||||
|
||||
fun aa_drawChartWithChartModel(chartModel: AAChartModel) {
|
||||
val aaOptions: AAOptions = chartModel.aa_toAAOptions()
|
||||
aa_drawChartWithChartOptions(aaOptions)
|
||||
}
|
||||
|
||||
fun aa_refreshChartWithChartModel(chartModel: AAChartModel) {
|
||||
val aaOptions: AAOptions = chartModel.aa_toAAOptions()
|
||||
aa_refreshChartWithChartOptions(aaOptions)
|
||||
}
|
||||
|
||||
fun aa_drawChartWithChartOptions(chartOptions: AAOptions) {
|
||||
if (optionsJson != null) {
|
||||
aa_refreshChartWithChartOptions(chartOptions)
|
||||
} else {
|
||||
loadLocalFilesAndDrawChart(chartOptions)
|
||||
showJavaScriptAlertView()
|
||||
}
|
||||
}
|
||||
|
||||
fun aa_refreshChartWithChartOptions(chartOptions: AAOptions) {
|
||||
configureChartOptionsAndDrawChart(chartOptions)
|
||||
}
|
||||
|
||||
fun aa_onlyRefreshTheChartDataWithChartOptionsSeriesArray(
|
||||
seriesElementsArr: Array<AASeriesElement>
|
||||
) {
|
||||
aa_onlyRefreshTheChartDataWithChartOptionsSeriesArray(seriesElementsArr, true)
|
||||
}
|
||||
|
||||
fun aa_onlyRefreshTheChartDataWithChartOptionsSeriesArray(
|
||||
seriesElementsArr: Array<AASeriesElement>,
|
||||
animation: Boolean
|
||||
) {
|
||||
val seriesArr = Gson().toJson(seriesElementsArr)
|
||||
val javaScriptStr = "onlyRefreshTheChartDataWithSeries('$seriesArr','$animation')"
|
||||
safeEvaluateJavaScriptString(javaScriptStr)
|
||||
}
|
||||
|
||||
fun aa_updateChartWithOptions(
|
||||
options: Any,
|
||||
redraw: Boolean
|
||||
) {
|
||||
val isAAOptionsClass = options is AAOptions
|
||||
val finalOptionsMapStr: String
|
||||
if (isAAOptionsClass) {
|
||||
val aaOptionsMapStr = Gson().toJson(options)
|
||||
finalOptionsMapStr = aaOptionsMapStr
|
||||
} else {
|
||||
var classNameStr = options.javaClass.simpleName
|
||||
classNameStr = classNameStr.replace("AA", "")
|
||||
|
||||
//convert fist character to be lowercase string
|
||||
val firstChar = classNameStr.substring(0, 1)
|
||||
val lowercaseFirstStr = firstChar.toLowerCase(Locale.ROOT)
|
||||
classNameStr = classNameStr.substring(1)
|
||||
val finalClassName = lowercaseFirstStr + classNameStr
|
||||
val finalOptionsMap = HashMap<String, Any>()
|
||||
finalOptionsMap[finalClassName] = options
|
||||
val optionsStr = Gson().toJson(finalOptionsMap)
|
||||
finalOptionsMapStr = optionsStr
|
||||
}
|
||||
val javaScriptStr = "updateChart('$finalOptionsMapStr','$redraw')"
|
||||
safeEvaluateJavaScriptString(javaScriptStr)
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
fun aa_addPointToChartSeriesElement(
|
||||
elementIndex: Int,
|
||||
options: Any,
|
||||
shift: Boolean =
|
||||
true
|
||||
) {
|
||||
aa_addPointToChartSeriesElement(
|
||||
elementIndex,
|
||||
options,
|
||||
true,
|
||||
shift,
|
||||
true
|
||||
)
|
||||
}
|
||||
|
||||
fun aa_addPointToChartSeriesElement(
|
||||
elementIndex: Int,
|
||||
options: Any,
|
||||
redraw: Boolean,
|
||||
shift: Boolean,
|
||||
animation: Boolean
|
||||
) {
|
||||
val optionsStr: String = if (
|
||||
options is Int
|
||||
|| options is Float
|
||||
|| options is Double
|
||||
) {
|
||||
options.toString()
|
||||
} else {
|
||||
Gson().toJson(options)
|
||||
}
|
||||
val javaScriptStr = "addPointToChartSeries('$elementIndex','$optionsStr','$redraw','$shift','$animation')"
|
||||
safeEvaluateJavaScriptString(javaScriptStr)
|
||||
}
|
||||
|
||||
fun aa_showTheSeriesElementContent(elementIndex: Int) {
|
||||
val javaScriptStr = "showTheSeriesElementContentWithIndex('$elementIndex')"
|
||||
safeEvaluateJavaScriptString(javaScriptStr)
|
||||
}
|
||||
|
||||
fun aa_hideTheSeriesElementContent(elementIndex: Int) {
|
||||
val javaScriptStr = "hideTheSeriesElementContentWithIndex('$elementIndex')"
|
||||
safeEvaluateJavaScriptString(javaScriptStr)
|
||||
}
|
||||
|
||||
fun aa_addElementToChartSeries(aaSeriesElement: AASeriesElement) {
|
||||
val pureElementJsonStr = Gson().toJson(aaSeriesElement)
|
||||
val javaScriptStr = "addElementToChartSeriesWithElement('$pureElementJsonStr')"
|
||||
safeEvaluateJavaScriptString(javaScriptStr)
|
||||
}
|
||||
|
||||
fun aa_removeElementFromChartSeries(elementIndex: Int) {
|
||||
val javaScriptStr = "removeElementFromChartSeriesWithElementIndex('$elementIndex')"
|
||||
safeEvaluateJavaScriptString(javaScriptStr)
|
||||
}
|
||||
|
||||
fun aa_evaluateTheJavaScriptStringFunction(jsFunctionStr: String) {
|
||||
val pureJSFunctionStr: String =
|
||||
AAJSStringPurer.pureJavaScriptFunctionString(jsFunctionStr)
|
||||
val jsFunctionNameStr = "evaluateTheJavaScriptStringFunction('$pureJSFunctionStr')"
|
||||
safeEvaluateJavaScriptString(jsFunctionNameStr)
|
||||
}
|
||||
|
||||
private fun loadLocalFilesAndDrawChart(aaOptions: AAOptions) {
|
||||
loadUrl("file:///android_asset/AAChartView.html")
|
||||
webViewClient = object : WebViewClient() {
|
||||
override fun onPageFinished(
|
||||
view: WebView,
|
||||
url: String
|
||||
) { //Log.i("js files load","图表加载完成!!!!!!!! ");
|
||||
configureChartOptionsAndDrawChart(aaOptions)
|
||||
callBack?.chartViewDidFinishLoad(this@AAChartView)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureChartOptionsAndDrawChart(chartOptions: AAOptions) {
|
||||
if (isClearBackgroundColor!!) {
|
||||
chartOptions.chart!!.backgroundColor("rgba(0,0,0,0)")
|
||||
}
|
||||
val aaOptionsJsonStr = Gson().toJson(chartOptions)
|
||||
optionsJson = aaOptionsJsonStr
|
||||
val javaScriptStr = "loadTheHighChartView('$aaOptionsJsonStr','$contentWidth','$contentHeight')"
|
||||
safeEvaluateJavaScriptString(javaScriptStr)
|
||||
}
|
||||
|
||||
private fun showJavaScriptAlertView() {
|
||||
webChromeClient = object : WebChromeClient() {
|
||||
override fun onJsAlert(
|
||||
view: WebView,
|
||||
url: String,
|
||||
message: String,
|
||||
result: JsResult
|
||||
): Boolean {
|
||||
super.onJsAlert(view, url, message, result)
|
||||
val urlStr = "url --->$url\n\n\n"
|
||||
val messageStr = "message --->$message\n\n\n"
|
||||
val resultStr = "result --->$result"
|
||||
val alertMessageStr = urlStr + messageStr + resultStr
|
||||
AlertDialog.Builder(context)
|
||||
.setTitle("JavaScript alert Information")
|
||||
.setMessage(alertMessageStr)
|
||||
.setNeutralButton("sure", null)
|
||||
.show()
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getEventMessageModel(messageBody: Map<String, Any>): AAMoveOverEventMessageModel {
|
||||
val eventMessageModel = AAMoveOverEventMessageModel()
|
||||
eventMessageModel.name = messageBody["name"].toString()
|
||||
eventMessageModel.x = messageBody["x"] as Double?
|
||||
eventMessageModel.y = messageBody["y"] as Double?
|
||||
eventMessageModel.category = messageBody["category"].toString()
|
||||
eventMessageModel.offset = messageBody["offset"] as LinkedTreeMap<String, Any>?
|
||||
val index = messageBody["index"] as Double?
|
||||
eventMessageModel.index = index?.toInt()
|
||||
return eventMessageModel
|
||||
}
|
||||
|
||||
private fun safeEvaluateJavaScriptString(javaScriptString: String) {
|
||||
if (isInEditMode) return
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
evaluateJavascript("javascript:$javaScriptString") {
|
||||
//Log.i("call back information","输出打印查看回调的结果"+ it);
|
||||
}
|
||||
} else {
|
||||
loadUrl("javascript:$javaScriptString")
|
||||
}
|
||||
}
|
||||
}
|
||||
+369
@@ -0,0 +1,369 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aachartcreator
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.*
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAColor
|
||||
|
||||
class AAOptions {
|
||||
var chart: AAChart? = null
|
||||
var title: AATitle? = null
|
||||
var subtitle: AASubtitle? = null
|
||||
var xAxis: AAXAxis? = null
|
||||
var yAxis: AAYAxis? = null
|
||||
var xAxisArray: Array<AAXAxis>? = null
|
||||
var yAxisArray: Array<AAYAxis>? = null
|
||||
var tooltip: AATooltip? = null
|
||||
var plotOptions: AAPlotOptions? = null
|
||||
var series: Array<Any>? = null
|
||||
var legend: AALegend? = null
|
||||
var pane: AAPane? = null
|
||||
var colors: Array<Any>? = null
|
||||
var credits: AACredits? = null
|
||||
var defaultOptions: AALang? = null
|
||||
var touchEventEnabled: Boolean? = null
|
||||
|
||||
fun chart(prop: AAChart): AAOptions {
|
||||
chart = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun title(prop: AATitle): AAOptions {
|
||||
title = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun subtitle(prop: AASubtitle): AAOptions {
|
||||
subtitle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun xAxis(prop: AAXAxis): AAOptions {
|
||||
xAxis = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxis(prop: AAYAxis): AAOptions {
|
||||
yAxis = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun xAxisArray(prop: Array<AAXAxis>): AAOptions {
|
||||
xAxisArray = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxisArray(prop: Array<AAYAxis>): AAOptions {
|
||||
yAxisArray = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tooltip(prop: AATooltip): AAOptions {
|
||||
tooltip = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun plotOptions(prop: AAPlotOptions): AAOptions {
|
||||
plotOptions = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun series(prop: Array<Any>?): AAOptions {
|
||||
series = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun legend(prop: AALegend): AAOptions {
|
||||
legend = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pane(prop: AAPane?): AAOptions {
|
||||
pane = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun colors(prop: Array<Any>?): AAOptions {
|
||||
colors = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun credits(prop: AACredits): AAOptions {
|
||||
credits = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun defaultOptions(prop: AALang): AAOptions {
|
||||
defaultOptions = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun touchEventEnabled(prop: Boolean?): AAOptions {
|
||||
touchEventEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
init {
|
||||
val aaCredits = AACredits()
|
||||
aaCredits.enabled = false
|
||||
credits = aaCredits
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
object AAOptionsConstructor {
|
||||
fun configureChartOptions(
|
||||
aaChartModel: AAChartModel
|
||||
): AAOptions {
|
||||
val aaChart = AAChart()
|
||||
.type(aaChartModel.chartType) //绘图类型
|
||||
.inverted(aaChartModel.inverted) //设置是否反转坐标轴,使X轴垂直,Y轴水平。 如果值为 true,则 x 轴默认是 倒置 的。 如果图表中出现条形图系列,则会自动反转
|
||||
.backgroundColor(aaChartModel.backgroundColor) //设置图表的背景色(包含透明度的设置)
|
||||
.pinchType(aaChartModel.zoomType) //设置手势缩放方向
|
||||
.panning(true) //设置手势缩放后是否可平移
|
||||
.polar(aaChartModel.polar) //是否极化图表(开启极坐标模式)
|
||||
.margin(aaChartModel.margin)
|
||||
.scrollablePlotArea(aaChartModel.scrollablePlotArea)
|
||||
|
||||
val aaTitle = AATitle()
|
||||
.text(aaChartModel.title) //标题文本内容
|
||||
.style(aaChartModel.titleStyle)
|
||||
|
||||
val aaSubtitle = AASubtitle()
|
||||
.text(aaChartModel.subtitle) //副标题内容
|
||||
.align(aaChartModel.subtitleAlign) //图表副标题文本水平对齐方式。可选的值有 “left”,”center“和“right”。 默认是:center.
|
||||
.style(aaChartModel.subtitleStyle)
|
||||
|
||||
val aaTooltip = AATooltip()
|
||||
.enabled(aaChartModel.tooltipEnabled) //启用浮动提示框
|
||||
.shared(true) //多组数据共享一个浮动提示框
|
||||
.valueSuffix(aaChartModel.tooltipValueSuffix) //浮动提示框的单位名称后缀
|
||||
|
||||
val aaPlotOptions = AAPlotOptions()
|
||||
.series(AASeries()
|
||||
.stacking(aaChartModel.stacking) //设置是否百分比堆叠显示图形
|
||||
)
|
||||
|
||||
if (aaChartModel.animationType != AAChartAnimationType.Linear) {
|
||||
aaPlotOptions.series?.animation(
|
||||
AAAnimation()
|
||||
.easing(aaChartModel.animationType)
|
||||
.duration(aaChartModel.animationDuration)
|
||||
)
|
||||
}
|
||||
|
||||
configureAAPlotOptionsMarkerStyle(aaChartModel, aaPlotOptions)
|
||||
configureAAPlotOptionsDataLabels(aaPlotOptions, aaChartModel)
|
||||
|
||||
val aaLegend = AALegend()
|
||||
.enabled(aaChartModel.legendEnabled) //是否显示 legend
|
||||
.itemStyle(AAItemStyle()
|
||||
.color(aaChartModel.axesTextColor))
|
||||
|
||||
val aaOptions = AAOptions()
|
||||
.chart(aaChart)
|
||||
.title(aaTitle)
|
||||
.subtitle(aaSubtitle)
|
||||
.tooltip(aaTooltip)
|
||||
.plotOptions(aaPlotOptions)
|
||||
.legend(aaLegend)
|
||||
.series(aaChartModel.series)
|
||||
.colors(aaChartModel.colorsTheme) //设置颜色主题
|
||||
.touchEventEnabled(aaChartModel.touchEventEnabled) //是否支持点击事件
|
||||
|
||||
configureAxisContentAndStyle(aaOptions, aaChartModel)
|
||||
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
private fun configureAAPlotOptionsMarkerStyle(
|
||||
aaChartModel: AAChartModel,
|
||||
aaPlotOptions: AAPlotOptions
|
||||
) {
|
||||
//数据点标记相关配置,只有线性图(折线图、曲线图、折线区域填充图、曲线区域填充图,散点图)才有数据点标记
|
||||
when (aaChartModel.chartType) {
|
||||
AAChartType.Area,
|
||||
AAChartType.Areaspline,
|
||||
AAChartType.Line,
|
||||
AAChartType.Spline,
|
||||
AAChartType.Scatter,
|
||||
AAChartType.Arearange,
|
||||
AAChartType.Areasplinerange,
|
||||
AAChartType.Polygon -> {
|
||||
val aaMarker = AAMarker()
|
||||
.radius(aaChartModel.markerRadius) //曲线连接点半径,默认是4
|
||||
.symbol(aaChartModel.markerSymbol?.value) //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
||||
if (aaChartModel.markerSymbolStyle == AAChartSymbolStyleType.InnerBlank) {
|
||||
aaMarker.fillColor(AAColor.White) //点的填充色(用来设置折线连接点的填充色)
|
||||
.lineWidth(2f) //外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
||||
.lineColor("") //外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
|
||||
} else if (aaChartModel.markerSymbolStyle == AAChartSymbolStyleType.BorderBlank) {
|
||||
aaMarker.lineWidth(2f)
|
||||
.lineColor(aaChartModel.backgroundColor)
|
||||
}
|
||||
val aaSeries = aaPlotOptions.series
|
||||
aaSeries?.marker(aaMarker)
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun configureAAPlotOptionsDataLabels(
|
||||
aaPlotOptions: AAPlotOptions,
|
||||
aaChartModel: AAChartModel
|
||||
) {
|
||||
val aaDataLabels = AADataLabels()
|
||||
if (aaChartModel.dataLabelsEnabled == true) {
|
||||
aaDataLabels
|
||||
.enabled(true)
|
||||
.style(aaChartModel.dataLabelsStyle)
|
||||
}
|
||||
|
||||
when (aaChartModel.chartType) {
|
||||
AAChartType.Column -> {
|
||||
val aaColumn = AAColumn()
|
||||
.borderWidth(0f)
|
||||
.borderRadius(aaChartModel.borderRadius)
|
||||
if (aaChartModel.polar == true) {
|
||||
aaColumn.pointPadding(0f)
|
||||
.groupPadding(0.005f)
|
||||
}
|
||||
aaPlotOptions.column(aaColumn)
|
||||
}
|
||||
AAChartType.Bar -> {
|
||||
val aaBar = AABar()
|
||||
.borderWidth(0f)
|
||||
.borderRadius(aaChartModel.borderRadius)
|
||||
if (aaChartModel.polar == true) {
|
||||
aaBar.pointPadding(0f)
|
||||
.groupPadding(0.005f)
|
||||
}
|
||||
aaPlotOptions.bar(aaBar)
|
||||
}
|
||||
AAChartType.Pie -> {
|
||||
val aaPie = AAPie()
|
||||
.allowPointSelect(true)
|
||||
.cursor("pointer")
|
||||
.showInLegend(true)
|
||||
if (aaChartModel.dataLabelsEnabled == true) {
|
||||
aaDataLabels.format("<b>{point.name}</b>: {point.percentage:.1f} %")
|
||||
}
|
||||
aaPlotOptions.pie(aaPie)
|
||||
}
|
||||
AAChartType.Columnrange -> {
|
||||
val aaColumnrange = AAColumnrange()
|
||||
.borderRadius(0f) //The color of the border surrounding each column or bar
|
||||
.borderWidth(0f) //The corner radius of the border surrounding each column or bar. default:0
|
||||
aaPlotOptions.columnrange(aaColumnrange)
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
aaPlotOptions.series?.dataLabels(aaDataLabels)
|
||||
}
|
||||
|
||||
|
||||
private fun configureAxisContentAndStyle(
|
||||
aaOptions: AAOptions,
|
||||
aaChartModel: AAChartModel
|
||||
) {
|
||||
//x 轴和 Y 轴的相关配置,扇形图、金字塔图和漏斗图则不需要设置 X 轴和 Y 轴的相关内容
|
||||
when (val aaChartType = aaChartModel.chartType) {
|
||||
AAChartType.Column,
|
||||
AAChartType.Bar,
|
||||
AAChartType.Area,
|
||||
AAChartType.Areaspline,
|
||||
AAChartType.Line,
|
||||
AAChartType.Spline,
|
||||
AAChartType.Scatter,
|
||||
AAChartType.Bubble,
|
||||
AAChartType.Columnrange,
|
||||
AAChartType.Arearange,
|
||||
AAChartType.Areasplinerange,
|
||||
AAChartType.Boxplot,
|
||||
AAChartType.Waterfall,
|
||||
AAChartType.Polygon,
|
||||
AAChartType.Gauge -> {
|
||||
if (aaChartType != AAChartType.Gauge) {
|
||||
val aaXAxisLabelsEnabled = aaChartModel.xAxisLabelsEnabled
|
||||
val aaXAxisLabels = AALabels()
|
||||
.enabled(aaXAxisLabelsEnabled) //设置 x 轴是否显示文字
|
||||
if (aaXAxisLabelsEnabled!!) {
|
||||
aaXAxisLabels.style(AAStyle()
|
||||
.color(aaChartModel.axesTextColor)
|
||||
)
|
||||
}
|
||||
|
||||
val aaXAxis = AAXAxis()
|
||||
.labels(aaXAxisLabels) //设置 x 轴是否显示文字
|
||||
.reversed(aaChartModel.xAxisReversed)
|
||||
.gridLineWidth(aaChartModel.xAxisGridLineWidth) //x轴网格线宽度
|
||||
.categories(aaChartModel.categories)
|
||||
.visible(aaChartModel.xAxisVisible) //x轴是否可见
|
||||
.tickInterval(aaChartModel.xAxisTickInterval) //x轴坐标点间隔数
|
||||
|
||||
aaOptions.xAxis(aaXAxis)
|
||||
}
|
||||
|
||||
val aaYAxisLabelsEnabled = aaChartModel.yAxisLabelsEnabled
|
||||
val aaYAxisLabels = AALabels()
|
||||
.enabled(aaChartModel.yAxisLabelsEnabled)
|
||||
if (aaYAxisLabelsEnabled!!) {
|
||||
aaYAxisLabels.style(AAStyle()
|
||||
.color(aaChartModel.axesTextColor))
|
||||
}
|
||||
|
||||
val aaYAxis = AAYAxis()
|
||||
.labels(aaYAxisLabels) //设置 y 轴是否显示数字
|
||||
.min(aaChartModel.yAxisMin) //设置 y 轴最小值,最小值等于零就不能显示负值了
|
||||
.max(aaChartModel.yAxisMax) //y轴最大值
|
||||
.allowDecimals(aaChartModel.yAxisAllowDecimals) //是否允许显示小数
|
||||
.reversed(aaChartModel.yAxisReversed)
|
||||
.gridLineWidth(aaChartModel.yAxisGridLineWidth) //y轴网格线宽度
|
||||
.title(AATitle()
|
||||
.text(aaChartModel.yAxisTitle)
|
||||
.style(AAStyle()
|
||||
.color(aaChartModel.axesTextColor)))
|
||||
.lineWidth(aaChartModel.yAxisLineWidth) //设置 y轴轴线的宽度,为0即是隐藏 y轴轴线
|
||||
.visible(aaChartModel.yAxisVisible)
|
||||
|
||||
aaOptions.yAxis(aaYAxis)
|
||||
}
|
||||
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+354
@@ -0,0 +1,354 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aachartcreator
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.AADataLabels
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.AAMarker
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.AATooltip
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.AAZonesElement
|
||||
|
||||
|
||||
/**
|
||||
* Created by anan on 2018/4/16.
|
||||
*/
|
||||
|
||||
|
||||
class AASeriesElement {
|
||||
|
||||
private var type: String? = null
|
||||
private var allowPointSelect: Boolean? = null
|
||||
private var name: String? = null
|
||||
private var data: Array<Any>? = null
|
||||
private var lineWidth //折线图、曲线图、直方折线图、折线填充图、曲线填充图、直方折线填充图的线条宽度
|
||||
: Number? = null
|
||||
private var borderColor //The border color, It is only valid for column, bar, pie, columnrange, pyramid and funnel chart types
|
||||
: String? = null
|
||||
private var borderWidth //The border width, It is only valid for column, bar, pie, columnrange, pyramid and funnel chart types
|
||||
: Number? = null
|
||||
private var borderRadius //The corner radius of the border surrounding each column or bar.
|
||||
: Number? = null
|
||||
private var borderRadiusTopLeft: Any? = null
|
||||
private var borderRadiusTopRight: Any? = null
|
||||
private var borderRadiusBottomLeft: Any? = null
|
||||
private var borderRadiusBottomRight: Any? = null
|
||||
private var color: Any? = null
|
||||
private var fillColor: Any? = null
|
||||
private var fillOpacity //折线填充图、曲线填充图、直方折线填充图等填充图类型的填充颜色透明度
|
||||
: Float? = null
|
||||
private var threshold //The threshold, also called zero level or base level. For line type series this is only used in conjunction with negativeColor. default:0.
|
||||
: Number? = null
|
||||
private var negativeColor // The color for the parts of the graph or points that are below the threshold
|
||||
: String? = null
|
||||
private var negativeFillColor: Any? = null
|
||||
private var size: Any? = null
|
||||
private var innerSize: Any? = null
|
||||
private var dashStyle: String? = null
|
||||
private var yAxis: Int? = null
|
||||
private var dataLabels: AADataLabels? = null
|
||||
private var marker: AAMarker? = null
|
||||
private var step: Any? = null
|
||||
private var states: Any? = null
|
||||
private var colorByPoint: Boolean? = null
|
||||
private var zIndex: Int? = null
|
||||
private var zones: Array<AAZonesElement>? = null
|
||||
private var zoneAxis: String? = null
|
||||
private var shadow: AAShadow? = null
|
||||
private var stack: String? = null
|
||||
private var tooltip: AATooltip? = null
|
||||
private var showInLegend: Boolean? = null
|
||||
private var enableMouseTracking: Boolean? = null
|
||||
private var reversed: Boolean? = null
|
||||
private var id: String? = null
|
||||
private var connectNulls: Boolean? = null
|
||||
|
||||
|
||||
fun type(prop: AAChartType?): AASeriesElement {
|
||||
type = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun allowPointSelect(prop: Boolean?): AASeriesElement {
|
||||
allowPointSelect = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun name(prop: String?): AASeriesElement {
|
||||
name = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun data(prop: Array<Any>): AASeriesElement {
|
||||
data = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidth(prop: Number?): AASeriesElement {
|
||||
lineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderColor(prop: String?): AASeriesElement {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AASeriesElement {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadius(prop: Number?): AASeriesElement {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadiusTopLeft(prop: Any?): AASeriesElement {
|
||||
borderRadiusTopLeft = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadiusTopRight(prop: Any?): AASeriesElement {
|
||||
borderRadiusTopRight = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadiusBottomLeft(prop: Any?): AASeriesElement {
|
||||
borderRadiusBottomLeft = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadiusBottomRight(prop: Any?): AASeriesElement {
|
||||
borderRadiusBottomRight = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: Any?): AASeriesElement {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun fillColor(prop: Any?): AASeriesElement {
|
||||
fillColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun fillOpacity(prop: Float?): AASeriesElement {
|
||||
fillOpacity = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun threshold(prop: Number?): AASeriesElement {
|
||||
threshold = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun negativeColor(prop: String?): AASeriesElement {
|
||||
negativeColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun negativeFillColor(prop: Any?): AASeriesElement {
|
||||
negativeFillColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun size(prop: Any?): AASeriesElement {
|
||||
size = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun innerSize(prop: Any?): AASeriesElement {
|
||||
innerSize = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dashStyle(prop: AAChartLineDashStyleType?): AASeriesElement {
|
||||
dashStyle = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxis(prop: Int?): AASeriesElement {
|
||||
yAxis = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabels(prop: AADataLabels?): AASeriesElement {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun marker(prop: AAMarker?): AASeriesElement {
|
||||
marker = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun step(prop: Any?): AASeriesElement {
|
||||
step = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun states(prop: Any?): AASeriesElement {
|
||||
states = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun colorByPoint(prop: Boolean?): AASeriesElement {
|
||||
colorByPoint = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun zIndex(prop: Int?): AASeriesElement {
|
||||
zIndex = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun zones(prop: Array<AAZonesElement>): AASeriesElement {
|
||||
zones = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun zoneAxis(prop: String?): AASeriesElement {
|
||||
zoneAxis = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun shadow(prop: AAShadow?): AASeriesElement {
|
||||
shadow = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun stack(prop: String?): AASeriesElement {
|
||||
stack = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tooltip(prop: AATooltip?): AASeriesElement {
|
||||
tooltip = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun showInLegend(prop: Boolean?): AASeriesElement {
|
||||
showInLegend = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun enableMouseTracking(prop: Boolean?): AASeriesElement {
|
||||
enableMouseTracking = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun reversed(prop: Boolean?): AASeriesElement {
|
||||
reversed = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun id(prop: String?): AASeriesElement {
|
||||
id = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun connectNulls(prop: Boolean?): AASeriesElement {
|
||||
connectNulls = prop
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AADataElement {
|
||||
private var name: String? = null
|
||||
private var x: Number? = null
|
||||
private var y: Number? = null
|
||||
private var color: Any? = null
|
||||
private var dataLabels: AADataLabels? = null
|
||||
private var marker: AAMarker? = null
|
||||
|
||||
fun name(prop: String): AADataElement {
|
||||
name = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun x(prop: Number): AADataElement {
|
||||
x = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun y(prop: Number?): AADataElement {
|
||||
y = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: Any): AADataElement {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AADataElement {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun marker(prop: AAMarker): AADataElement {
|
||||
marker = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AAShadow {
|
||||
private var color: String? = null
|
||||
private var offsetX: Number? = null
|
||||
private var offsetY: Number? = null
|
||||
private var opacity: Float? = null
|
||||
private var width: Number? = null
|
||||
|
||||
fun color(prop: String): AAShadow {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun offsetX(prop: Number?): AAShadow {
|
||||
offsetX = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun offsetY(prop: Number?): AAShadow {
|
||||
offsetY = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun opacity(prop: Float?): AAShadow {
|
||||
opacity = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun width(prop: Number?): AAShadow {
|
||||
width = prop
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAAnimation
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:14
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAnimationType
|
||||
|
||||
class AAAnimation {
|
||||
var duration: Int? = null
|
||||
var easing: String? = null
|
||||
|
||||
fun duration(prop: Int?): AAAnimation {
|
||||
duration = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun easing(prop: AAChartAnimationType?): AAAnimation {
|
||||
easing = prop?.value
|
||||
return this
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
enum class AAChartAxisType(val value: String) {
|
||||
Linear("linear"),
|
||||
Logarithmic("logarithmic"),
|
||||
Datetime("datetime"),
|
||||
Category("category"),
|
||||
}
|
||||
|
||||
|
||||
open class AAAxis {
|
||||
var allowDecimals: Boolean? = null
|
||||
var alternateGridColor: Any? = null
|
||||
var crosshair: AACrosshair? = null //准星线样式设置
|
||||
var title: AATitle? = null
|
||||
var type: String? = null
|
||||
var dateTimeLabelFormats: AADateTimeLabelFormats? = null
|
||||
var plotBands: Array<AAPlotBandsElement>? = null
|
||||
var plotLines: Array<AAPlotLinesElement>? = null
|
||||
var categories: Array<String>? = null
|
||||
var linkedTo: Int? = null
|
||||
var reversed: Boolean? = null
|
||||
var reversedStacks: Boolean? = null
|
||||
var opposite: Boolean? = null
|
||||
var lineWidth: Number? = null //坐标轴轴线宽度
|
||||
var lineColor: String? = null //坐标轴轴线线颜色
|
||||
var max: Number? = null //坐标轴最大值
|
||||
var min: Number? = null //坐标轴最小值(设置为0就不会有负数)
|
||||
var minRange: Int? = null
|
||||
var minTickInterval: Int? = null //The minimum tick interval allowed in axis values. For example on zooming in on an axis with daily data, this can be used to prevent the axis from showing hours. Defaults to the closest distance between two points on the axis.
|
||||
var minorTicks: Boolean? = null //是否显示副刻度
|
||||
var minorGridLineColor: String? = null //Color of the minor, secondary grid lines.
|
||||
var minorGridLineDashStyle: String? = null //The dash or dot style of the minor grid lines.
|
||||
var minorGridLineWidth: Number? = null //Width of the minor, secondary grid lines.
|
||||
var minorTickColor: String? = null //Color for the minor tick marks.
|
||||
var minorTickInterval: Any? = null /*Specific tick interval in axis units for the minor ticks. On a linear axis, if "auto", the minor tick interval is calculated as a fifth of the tickInterval. If null or undefined, minor ticks are not shown.
|
||||
On logarithmic axes, the unit is the power of the value. For example, setting the minorTickInterval to 1 puts one tick on each of 0.1, 1, 10, 100 etc. Setting the minorTickInterval to 0.1 produces 9 ticks between 1 and 10, 10 and 100 etc.
|
||||
If user settings dictate minor ticks to become too dense, they don't make sense, and will be ignored to prevent performance problems.*/
|
||||
var minorTickLength: Number? = null //The pixel length of the minor tick marks.
|
||||
var minorTickPosition: String? = null //The position of the minor tick marks relative to the axis line. Can be one of inside and outside. Defaults to outside.
|
||||
var minorTickWidth: Number? = null //The pixel width of the minor tick mark.
|
||||
|
||||
var gridLineWidth: Number? = null //坐标轴网格线宽度
|
||||
var gridLineColor: String? = null //坐标轴网格线颜色
|
||||
var gridLineDashStyle: String? = null //坐标轴网格线样式
|
||||
var gridLineInterpolation: String? = null
|
||||
var offset: Number? = null //坐标轴垂直偏移
|
||||
var labels: AALabels? = null //用于设置坐标轴文字相关的
|
||||
var visible: Boolean? = null //用于设置坐标轴以及坐标轴文字是否显示
|
||||
var startOnTick: Boolean? = null //Whether to force the axis to start on a tick. Use this option with the maxPadding option to control the axis start.This option is always disabled, when panning type is either y or xy. Defaults to true.
|
||||
var endOnTick: Boolean? = null //Whether to force the axis to end on a tick. Use this option with the maxPadding option to control the axis end. This option is always disabled, when panning type is either y or xy. Defaults to true.
|
||||
var tickColor: String? = null //坐标轴轴线下方刻度线颜色
|
||||
var tickInterval: Number? = null //坐标轴刻度点间隔数(设置每隔几个点显示一个 坐标轴的内容:
|
||||
var tickmarkPlacement: String? = null //本参数只对分类轴有效。 当值为 on 时刻度线将在分类上方显示;当值为 between 时,刻度线将在两个分类中间显示。当 tickInterval 为 1 时,默认是 between,其他情况默认是 on。 默认是:null.
|
||||
var tickWidth: Number? = null //坐标轴刻度线的宽度,设置为 0 时则不显示刻度线
|
||||
var tickLength: Number? = null //坐标轴刻度线的长度。 默认是:10.
|
||||
var tickPosition: String? = null //刻度线相对于轴线的位置,可用的值有 inside 和 outside,分别表示在轴线的内部和外部。 默认是:outside.
|
||||
var tickPositions: Array<Any>? = null // Custom chart axis coordinates
|
||||
}
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAChart
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:49
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartZoomType
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
|
||||
|
||||
class AAChart {
|
||||
var type: String? = null
|
||||
var backgroundColor: Any? = null
|
||||
var plotBackgroundImage: String? = null
|
||||
var pinchType: String? = null
|
||||
var panning: Boolean? = null
|
||||
var panKey: String? = null
|
||||
var polar: Boolean? = null
|
||||
var animation: Any? = null //AAAnimation | Boolean
|
||||
var inverted: Boolean? = null
|
||||
|
||||
/*图表外边缘和绘图区域之间的边距。 数组中的数字分别表示顶部,右侧,底部和左侧 ([👆,👉,👇,👈])。
|
||||
也可以使用 marginTop,marginRight,marginBottom 和 marginLeft 来设置某一个方向的边距*/
|
||||
var margin: Array<Number>? = null
|
||||
var marginTop: Number? = null//👆
|
||||
var marginRight: Number? = null//👉
|
||||
var marginBottom: Number? = null//👇
|
||||
var marginLeft: Number? = null//👈
|
||||
var scrollablePlotArea: AAScrollablePlotArea? = null
|
||||
var resetZoomButton: AAResetZoomButton? = null
|
||||
var zoomType: String? = null
|
||||
var events: AAChartEvents? = null
|
||||
var height: Number? = null
|
||||
|
||||
|
||||
fun type(prop: AAChartType?): AAChart {
|
||||
type = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun backgroundColor(prop: Any?): AAChart {
|
||||
backgroundColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun plotBackgroundImage(prop: String): AAChart {
|
||||
plotBackgroundImage = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pinchType(prop: AAChartZoomType?): AAChart {
|
||||
pinchType = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun panning(prop: Boolean?): AAChart {
|
||||
panning = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun panKey(prop: String): AAChart {
|
||||
panKey = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun polar(prop: Boolean?): AAChart {
|
||||
polar = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun animation(prop: Any): AAChart {
|
||||
animation = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun inverted(prop: Boolean?): AAChart {
|
||||
inverted = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun margin(prop: Array<Number>?): AAChart {
|
||||
margin = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun marginTop(prop: Number): AAChart {
|
||||
marginTop = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun marginRight(prop: Number): AAChart {
|
||||
marginRight = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun marginBottom(prop: Number): AAChart {
|
||||
marginBottom = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun marginLeft(prop: Number): AAChart {
|
||||
marginLeft = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun scrollablePlotArea(prop: AAScrollablePlotArea?): AAChart {
|
||||
scrollablePlotArea = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun resetZoomButton(prop: AAResetZoomButton): AAChart {
|
||||
resetZoomButton = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun zoomType(zoomType: String?): AAChart {
|
||||
this.zoomType = zoomType
|
||||
return this
|
||||
}
|
||||
|
||||
fun events(events: AAChartEvents?): AAChart {
|
||||
this.events = events
|
||||
return this
|
||||
}
|
||||
|
||||
fun height(height: Number?): AAChart {
|
||||
this.height = height
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class AAResetZoomButton {
|
||||
var position: AAPosition? = null
|
||||
var relativeTo: String? = null
|
||||
var theme: Map<String, Any>? = null
|
||||
fun position(prop: AAPosition?): AAResetZoomButton {
|
||||
position = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun relativeTo(prop: String?): AAResetZoomButton {
|
||||
relativeTo = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun theme(prop: Map<String, Any>?): AAResetZoomButton {
|
||||
theme = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AAChartEvents {
|
||||
var load: String? = null
|
||||
var redraw: String? = null
|
||||
var render: String? = null
|
||||
var selection: String? = null
|
||||
|
||||
fun load(prop: String): AAChartEvents {
|
||||
load = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun redraw(prop: String): AAChartEvents {
|
||||
redraw = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun render(prop: String): AAChartEvents {
|
||||
render = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun selection(prop: String): AAChartEvents {
|
||||
selection = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2021
|
||||
* FileName: AACredits
|
||||
* Author: AnAn
|
||||
* Date: 2021/1/26 10:55 AM
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel;
|
||||
|
||||
|
||||
class AACredits {
|
||||
var enabled: Boolean? = null
|
||||
var href: String? = null
|
||||
var position: AAPosition? = null
|
||||
var style: AAStyle? = null
|
||||
var text: String? = null
|
||||
fun enabled(prop: Boolean): AACredits {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun href(prop: String?): AACredits {
|
||||
href = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun position(prop: AAPosition?): AACredits {
|
||||
position = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun style(prop: AAStyle?): AACredits {
|
||||
style = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun text(prop: String?): AACredits {
|
||||
text = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AAPosition {
|
||||
var align: String? = null
|
||||
var verticalAlign: String? = null
|
||||
var x: Number? = null
|
||||
var y: Number? = null
|
||||
fun align(prop: String?): AAPosition {
|
||||
align = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun verticalAlign(prop: String?): AAPosition {
|
||||
verticalAlign = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun align(prop: Number?): AAPosition {
|
||||
x = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun y(prop: Number?): AAPosition {
|
||||
y = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AACrosshair
|
||||
* Author: ios-fn
|
||||
* Date: 2019-06-16 19:19
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartLineDashStyleType
|
||||
|
||||
class AACrosshair {
|
||||
var width: Number? = null
|
||||
var color: String? = null
|
||||
var dashStyle: AAChartLineDashStyleType? = null
|
||||
|
||||
fun width(prop: Number?): AACrosshair {
|
||||
width = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: String): AACrosshair {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dashStyle(prop: AAChartLineDashStyleType): AACrosshair {
|
||||
dashStyle = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AADataLabels
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:35
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartVerticalAlignType
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
|
||||
|
||||
class AADataLabels {
|
||||
var enabled: Boolean? = null
|
||||
var align: String? = null
|
||||
var inside: Boolean? = null
|
||||
var style: AAStyle? = null
|
||||
var format: String? = null
|
||||
var formatter: String? = null
|
||||
var rotation: Number? = null
|
||||
var allowOverlap: Boolean? = null
|
||||
var useHTML: Boolean? = null
|
||||
var distance: Number? = null
|
||||
var verticalAlign: String? = null
|
||||
var x: Number? = null
|
||||
var y: Number? = null
|
||||
var color: String? = null
|
||||
var backgroundColor: String? = null
|
||||
var borderColor: String? = null
|
||||
var borderRadius: Number? = null
|
||||
var borderWidth: Number? = null
|
||||
var shape: String? = null
|
||||
var crop: Boolean? = null
|
||||
var overflow: String? = null
|
||||
var softConnector: Boolean? = null
|
||||
var textPath: Any? = null
|
||||
var filter: Any? = null
|
||||
|
||||
fun enabled(prop: Boolean?): AADataLabels {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun align(prop: AAChartAlignType?): AADataLabels {
|
||||
align = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun inside(prop: Boolean?): AADataLabels {
|
||||
inside = prop
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
fun style(prop: AAStyle?): AADataLabels {
|
||||
style = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun format(prop: String?): AADataLabels {
|
||||
format = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun formatter(prop: String?): AADataLabels {
|
||||
formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun rotation(prop: Number?): AADataLabels {
|
||||
rotation = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun allowOverlap(prop: Boolean?): AADataLabels {
|
||||
allowOverlap = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun useHTML(prop: Boolean?): AADataLabels {
|
||||
useHTML = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun distance(prop: Number?): AADataLabels {
|
||||
distance = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun verticalAlign(prop: AAChartVerticalAlignType?): AADataLabels {
|
||||
verticalAlign = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun x(prop: Number?): AADataLabels {
|
||||
x = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun y(prop: Number?): AADataLabels {
|
||||
y = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: String?): AADataLabels {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun backgroundColor(prop: String?): AADataLabels {
|
||||
backgroundColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderColor(prop: String?): AADataLabels {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadius(prop: Number?): AADataLabels {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AADataLabels {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun shape(prop: String?): AADataLabels {
|
||||
shape = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun crop(prop: Boolean?): AADataLabels {
|
||||
crop = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun overflow(prop: String?): AADataLabels {
|
||||
overflow = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun softConnector(prop: Boolean?): AADataLabels {
|
||||
softConnector = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun textPath(prop: Any?): AADataLabels {
|
||||
textPath = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun filter(prop: Any?): AADataLabels {
|
||||
filter = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
class AADateTimeLabelFormats {
|
||||
var millisecond: String? = null
|
||||
var second: String? = null
|
||||
var minute: String? = null
|
||||
var hour: String? = null
|
||||
var day: String? = null
|
||||
var week: String? = null
|
||||
var month: String? = null
|
||||
var year: String? = null
|
||||
|
||||
fun millisecond(prop: String?): AADateTimeLabelFormats {
|
||||
millisecond = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun second(prop: String?): AADateTimeLabelFormats {
|
||||
second = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minute(prop: String?): AADateTimeLabelFormats {
|
||||
minute = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun hour(prop: String?): AADateTimeLabelFormats {
|
||||
hour = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun day(prop: String?): AADateTimeLabelFormats {
|
||||
day = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun week(prop: String?): AADateTimeLabelFormats {
|
||||
week = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun month(prop: String?): AADateTimeLabelFormats {
|
||||
month = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun year(prop: String?): AADateTimeLabelFormats {
|
||||
year = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AALabel
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:19
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
|
||||
|
||||
class AALabel {
|
||||
var align: String? = null //标签的对齐方式,可用的值有 "left"、"center" 及 "right"。默认值是根据坐标轴的位置(在图表中的位置)即标签的旋转角度进行智能判断的。 默认是:center.
|
||||
var rotation: Number? = null //标签的旋转角度 默认是:0.
|
||||
var text: String? = null //文字
|
||||
var textAlign: String? = null //文字对齐
|
||||
var useHTML: Boolean? = null //HTML渲染
|
||||
var verticalAlign: String? = null //竖直对齐
|
||||
var style: Any? = null //轴标签的 CSS 样式
|
||||
var x: Number? = null //水平偏移
|
||||
var y: Number? = null // 竖直偏移
|
||||
var format: String? = null //格式化标签文本
|
||||
var formatter: String? = null //格式化标签文本
|
||||
|
||||
|
||||
fun align(prop: String?): AALabel {
|
||||
align = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun rotation(prop: Number?): AALabel {
|
||||
rotation = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun text(prop: String?): AALabel {
|
||||
text = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun textAlign(prop: AAChartAlignType?): AALabel {
|
||||
textAlign = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun useHTML(prop: Boolean?): AALabel {
|
||||
useHTML = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun verticalAlign(prop: String?): AALabel {
|
||||
verticalAlign = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun style(prop: Any?): AALabel {
|
||||
style = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun x(prop: Number?): AALabel {
|
||||
x = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun y(prop: Number?): AALabel {
|
||||
y = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun format(prop: String?): AALabel {
|
||||
format = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun formatter(prop: String?): AALabel {
|
||||
formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AALabels
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:23
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
|
||||
|
||||
|
||||
class AALabels {
|
||||
var align: String? =
|
||||
null//轴标签的对齐方式,可用的值有 "left"、"center" 及 "right"。默认值是根据坐标轴的位置(在图表中的位置)即标签的旋转角度进行智能判断的。 默认是:center.
|
||||
var autoRotation: Any? =
|
||||
null //只针对水平轴有效,允许在防止轴标签重叠时自动旋转轴标签的角度。当空间足够时,轴标签不会被旋转。当图表变小时(主要是宽度变小) ,轴标签开始旋转对应的角度,然后会依次删除间隔的轴标签并尝试旋转数组中的角度。可以通过将此参数设置为 false 来关闭轴标签旋转(这将导致标签自动换行)。 默认是:[-45].
|
||||
var autoRotationLimit: Number? =
|
||||
null//当每个分类的宽度比该参数的值大很多(像素)时,轴标签将不会被自动旋转,而是以换行的形式展示轴标签。 当轴标签包含多个短词时换行展示轴标签可以使得轴标签有足够的空间,所以设置合理的自动旋转下限是非常有意义的。 默认是:80.
|
||||
var distance: Number? = null//只针对极地图有效,定义周标签与绘图区边缘的距离。 默认是:15.
|
||||
var enabled: Boolean? = null//是否显示坐标轴标签 默认是:true.
|
||||
var format: String? = null//坐标轴格式化字符串。 默认是:{value}.
|
||||
var formatter: String? = null//坐标轴格式化字符串。 默认是:{value}.
|
||||
var padding: Number? = null//轴标签的内间距,作用是保证轴标签之间有空隙。 默认是:5.
|
||||
var rotation: Number? = null//轴标签的旋转角度 默认是:0.
|
||||
var staggerLines: Int? = null//只针对水平轴有效,定义轴标签显示行数。
|
||||
var step: Int? =
|
||||
null//显示 n 的倍数标签,例如设置为 2 则表示标签间隔一个轴标签显示。默认情况下,为了避免轴标签被覆盖,该参数会根据情况自动计算。可以通过设置此参数为 1 来阻止自动计算。
|
||||
var style: AAStyle? = null//轴标签的 CSS 样式
|
||||
var x: Number? = null//相对于坐标轴刻度线的水平偏移。 默认是:0.
|
||||
var y: Number? = null//相对于坐标轴刻度线的垂直平偏移。 默认是:null.
|
||||
var useHTML: Boolean? = null//HTML渲染
|
||||
|
||||
fun align(prop: AAChartAlignType): AALabels {
|
||||
align = prop.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun autoRotation(prop: Any): AALabels {
|
||||
autoRotation = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun autoRotationLimit(prop: Number?): AALabels {
|
||||
autoRotationLimit = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun distance(prop: Number?): AALabels {
|
||||
distance = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun enabled(prop: Boolean?): AALabels {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun format(prop: String): AALabels {
|
||||
format = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun formatter(prop: String): AALabels {
|
||||
formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun padding(prop: Number?): AALabels {
|
||||
padding = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun rotation(prop: Number?): AALabels {
|
||||
rotation = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun staggerLines(prop: Int?): AALabels {
|
||||
staggerLines = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun step(prop: Int?): AALabels {
|
||||
step = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun style(prop: AAStyle): AALabels {
|
||||
style = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun x(prop: Number?): AALabels {
|
||||
x = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun y(prop: Number?): AALabels {
|
||||
y = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun useHTML(prop: Boolean?): AALabels {
|
||||
useHTML = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAChart
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:49
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
class AALang {
|
||||
var resetZoom: String? = null
|
||||
var thousandsSep: String? = null
|
||||
|
||||
fun resetZoom(prop: String?): AALang {
|
||||
resetZoom = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun thousandsSep(prop: String?): AALang {
|
||||
thousandsSep = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AALegend
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:48
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartFontWeightType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartLayoutType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartVerticalAlignType
|
||||
|
||||
class AALegend {
|
||||
var layout: String? =
|
||||
null //图例数据项的布局。布局类型: "horizontal" 或 "vertical" 即水平布局和垂直布局 默认是:horizontal.
|
||||
var align: String? = null //设定图例在图表区中的水平对齐方式,合法值有left,center 和 right。
|
||||
var verticalAlign: String? =
|
||||
null //设定图例在图表区中的垂直对齐方式,合法值有 top,middle 和 bottom。垂直位置可以通过 y 选项做进一步设定。
|
||||
var enabled: Boolean? = null
|
||||
var borderColor: String? = null
|
||||
var borderWidth: Number? = null
|
||||
var itemMarginTop: Number? = null //图例的每一项的顶部外边距,单位px。 默认是:0.
|
||||
var itemStyle: AAItemStyle? = null
|
||||
var x: Number? = null
|
||||
var y: Number? = null
|
||||
var floating: Boolean? = null
|
||||
var labelFormat: String? = null
|
||||
|
||||
fun layout(prop: AAChartLayoutType): AALegend {
|
||||
layout = prop.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun align(prop: AAChartAlignType): AALegend {
|
||||
align = prop.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun verticalAlign(prop: AAChartVerticalAlignType): AALegend {
|
||||
verticalAlign = prop.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun enabled(prop: Boolean?): AALegend {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderColor(prop: String): AALegend {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AALegend {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun itemMarginTop(prop: Number?): AALegend {
|
||||
itemMarginTop = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun itemStyle(prop: AAItemStyle): AALegend {
|
||||
itemStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun x(prop: Number?): AALegend {
|
||||
x = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun y(prop: Number?): AALegend {
|
||||
y = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun floating(prop: Boolean?): AALegend {
|
||||
floating = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun labelFormat(prop: String?): AALegend {
|
||||
labelFormat = prop
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class AAItemStyle {
|
||||
var color: String? = null
|
||||
var cursor: String? = null
|
||||
var pointer: String? = null
|
||||
var fontSize: String? = null
|
||||
var fontWeight: String? = null
|
||||
|
||||
|
||||
fun color(prop: String?): AAItemStyle {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun cursor(prop: String): AAItemStyle {
|
||||
cursor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointer(prop: String): AAItemStyle {
|
||||
pointer = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun fontSize(prop: Number?): AAItemStyle {
|
||||
prop?.let {
|
||||
fontSize = "${prop}px"
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
fun fontWeight(prop: AAChartFontWeightType?): AAItemStyle {
|
||||
fontWeight = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAMarker
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:33
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
open class AAMarker {
|
||||
var enabled: Boolean? = null
|
||||
var radius: Number? = null
|
||||
var symbol: String? = null
|
||||
var fillColor: String? = null//点的填充色(用来设置折线连接点的填充色)
|
||||
var lineWidth: Number? = null//外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
||||
var lineColor: Any? = null//外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色。)
|
||||
var states: AAMarkerStates? = null
|
||||
|
||||
fun enabled(prop: Boolean): AAMarker {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun radius(prop: Number?): AAMarker {
|
||||
radius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun symbol(prop: String?): AAMarker {
|
||||
symbol = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun fillColor(prop: String): AAMarker {
|
||||
fillColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidth(prop: Number?): AAMarker {
|
||||
lineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineColor(prop: Any?): AAMarker {
|
||||
lineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun states(prop: AAMarkerStates): AAMarker? {
|
||||
states = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
open class AAMarkerStates {
|
||||
var hover: AAMarkerHover? = null
|
||||
|
||||
fun hover(prop: AAMarkerHover?): AAMarkerStates {
|
||||
hover = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
open class AAMarkerHover {
|
||||
var enabled: Boolean? = null
|
||||
var fillColor: String? = null
|
||||
var lineColor: String? = null
|
||||
var lineWidth: Number? = null
|
||||
var lineWidthPlus: Number? = null
|
||||
var radius: Number? = null
|
||||
var radiusPlus: Number? = null
|
||||
|
||||
|
||||
fun enabled(prop: Boolean?): AAMarkerHover {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun fillColor(prop: String?): AAMarkerHover {
|
||||
fillColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineColor(prop: String?): AAMarkerHover {
|
||||
lineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidth(prop: Number?): AAMarkerHover {
|
||||
lineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidthPlus(prop: Number?): AAMarkerHover {
|
||||
lineWidthPlus = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun radius(prop: Number?): AAMarkerHover {
|
||||
radius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun radiusPlus(prop: Number?): AAMarkerHover {
|
||||
radiusPlus = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
class AAPane {
|
||||
var background: AABackground? = null
|
||||
var center: Array<Any>? = null
|
||||
var endAngle: Number? = null
|
||||
var size: Number? = null
|
||||
var startAngle: Number? = null
|
||||
fun background(prop: AABackground?): AAPane {
|
||||
background = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun center(prop: Array<Any>): AAPane {
|
||||
center = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun endAngle(prop: Number?): AAPane {
|
||||
endAngle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun size(prop: Number?): AAPane {
|
||||
size = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun startAngle(prop: Number?): AAPane {
|
||||
startAngle = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AABackground {
|
||||
var backgroundColor: Any? = null
|
||||
var borderColor: String? = null
|
||||
var borderWidth: Number? = null
|
||||
var className: String? = null
|
||||
var innerRadius: Number? = null
|
||||
var outerRadius: Number? = null
|
||||
var shape: String? = null
|
||||
fun backgroundColor(prop: Any?): AABackground {
|
||||
backgroundColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderColor(prop: String?): AABackground {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AABackground {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun className(prop: String?): AABackground {
|
||||
className = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun innerRadius(prop: Number?): AABackground {
|
||||
innerRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun outerRadius(prop: Number?): AABackground {
|
||||
outerRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun shape(prop: String?): AABackground {
|
||||
shape = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAPlotBandsElement
|
||||
* Author: ios-fn
|
||||
* Date: 2019-06-16 18:58
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
class AAPlotBandsElement {
|
||||
private var from: Number? = null
|
||||
private var to: Number? = null
|
||||
private var color: Any? = null
|
||||
private var borderColor: String? = null
|
||||
private var borderWidth: Number? = null
|
||||
private var className: String? = null
|
||||
private var label: AALabel? = null
|
||||
private var index: Int? = null
|
||||
|
||||
fun from(prop: Number?): AAPlotBandsElement {
|
||||
from = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun to(prop: Number?): AAPlotBandsElement {
|
||||
to = prop
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
fun color(prop: Any): AAPlotBandsElement {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderColor(prop: String): AAPlotBandsElement {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AAPlotBandsElement {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun className(prop: String): AAPlotBandsElement {
|
||||
className = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun label(prop: AALabel): AAPlotBandsElement {
|
||||
label = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun index(prop: Int?): AAPlotBandsElement {
|
||||
index = prop
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAPlotLinesElement
|
||||
* Author: ios-fn
|
||||
* Date: 2019-06-16 19:00
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartLineDashStyleType
|
||||
|
||||
|
||||
class AAPlotLinesElement {
|
||||
|
||||
private var color: Any? = null
|
||||
private var dashStyle: String? = null
|
||||
private var width: Number? = null
|
||||
private var value: Number? = null
|
||||
private var zIndex: Int? = null
|
||||
private var label: AALabel? = null
|
||||
|
||||
fun color(prop: Any): AAPlotLinesElement {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dashStyle(prop: AAChartLineDashStyleType): AAPlotLinesElement {
|
||||
dashStyle = prop.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun width(prop: Number?): AAPlotLinesElement {
|
||||
width = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun value(prop: Number?): AAPlotLinesElement {
|
||||
value = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun zIndex(prop: Int?): AAPlotLinesElement {
|
||||
zIndex = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun label(prop: AALabel): AAPlotLinesElement {
|
||||
label = prop
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+441
@@ -0,0 +1,441 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAPlotOptions
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:33
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartLineDashStyleType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
|
||||
|
||||
open class AAPlotOptions {
|
||||
var column: AAColumn? = null
|
||||
var bar: AABar? = null
|
||||
var line: AALine? = null
|
||||
var spline: AASpline? = null
|
||||
var area: AAArea? = null
|
||||
var areaspline: AAAreaspline? = null
|
||||
var pie: AAPie? = null
|
||||
var columnrange: Any? = null
|
||||
var arearange: Any? = null
|
||||
var series: AASeries? = null
|
||||
var scatter: AAScatter? = null
|
||||
|
||||
fun column(prop: AAColumn): AAPlotOptions {
|
||||
column = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun line(prop: AALine): AAPlotOptions {
|
||||
line = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pie(prop: AAPie): AAPlotOptions {
|
||||
pie = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun bar(prop: AABar): AAPlotOptions {
|
||||
bar = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun spline(prop: AASpline): AAPlotOptions {
|
||||
spline = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun area(prop: AAArea): AAPlotOptions {
|
||||
area = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun areaspline(prop: AAAreaspline): AAPlotOptions {
|
||||
areaspline = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun columnrange(prop: Any): AAPlotOptions {
|
||||
columnrange = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun arearange(prop: Any): AAPlotOptions {
|
||||
arearange = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun series(prop: AASeries): AAPlotOptions {
|
||||
series = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun scatter(prop: AAScatter): AAPlotOptions {
|
||||
scatter = prop
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
open class AAColumn {
|
||||
var name: String? = null
|
||||
var data: Array<Any>? = null
|
||||
var color: String? = null
|
||||
var grouping: Boolean? =
|
||||
null//Whether to group non-stacked columns or to let them render independent of each other. Non-grouped columns will be laid out individually and overlap each other. 默认是:true.
|
||||
var pointPadding: Float? =
|
||||
null//Padding between each column or bar, in x axis units. 默认是:0.1.
|
||||
var pointPlacement: Float? =
|
||||
null//Padding between each column or bar, in x axis units. 默认是:0.1.
|
||||
var groupPadding: Float? =
|
||||
null//Padding between each value groups, in x axis units. 默认是:0.2.
|
||||
var borderWidth: Number? = null
|
||||
var colorByPoint: Boolean? =
|
||||
null//对每个不同的点设置颜色(当图表类型为 AAColumn 时,设置为 AAColumn 对象的属性,当图表类型为 bar 时,应该设置为 bar 对象的属性才有效)
|
||||
var dataLabels: AADataLabels? = null
|
||||
var stacking: String? = null
|
||||
var borderRadius: Number? = null
|
||||
var yAxis: Int? = null
|
||||
|
||||
fun name(prop: String): AAColumn {
|
||||
name = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun data(prop: Array<Any>): AAColumn {
|
||||
data = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: String): AAColumn {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun grouping(prop: Boolean?): AAColumn {
|
||||
grouping = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointPadding(prop: Float?): AAColumn {
|
||||
pointPadding = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointPlacement(prop: Float?): AAColumn {
|
||||
pointPlacement = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun groupPadding(prop: Float?): AAColumn {
|
||||
groupPadding = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AAColumn {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun colorByPoint(prop: Boolean?): AAColumn {
|
||||
colorByPoint = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AAColumn {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun stacking(prop: String): AAColumn {
|
||||
stacking = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadius(prop: Number?): AAColumn {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxis(prop: Int?): AAColumn {
|
||||
yAxis = prop
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
open class AABar {
|
||||
var name: String? = null
|
||||
var data: Array<Any>? = null
|
||||
var color: String? = null
|
||||
var grouping: Boolean? =
|
||||
null//Whether to group non-stacked columns or to let them render independent of each other. Non-grouped columns will be laid out individually and overlap each other. 默认是:true.
|
||||
var pointPadding: Float? =
|
||||
null//Padding between each column or bar, in x axis units. 默认是:0.1.
|
||||
var pointPlacement: Float? =
|
||||
null//Padding between each column or bar, in x axis units. 默认是:0.1.
|
||||
var groupPadding: Float? =
|
||||
null//Padding between each value groups, in x axis units. 默认是:0.2.
|
||||
var borderWidth: Number? = null
|
||||
var colorByPoint: Boolean? =
|
||||
null//对每个不同的点设置颜色(当图表类型为 AABar 时,设置为 AABar 对象的属性,当图表类型为 bar 时,应该设置为 bar 对象的属性才有效)
|
||||
var dataLabels: AADataLabels? = null
|
||||
var stacking: String? = null
|
||||
var borderRadius: Number? = null
|
||||
var yAxis: Int? = null
|
||||
|
||||
fun name(prop: String): AABar {
|
||||
name = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun data(prop: Array<Any>): AABar {
|
||||
data = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: String): AABar {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun grouping(prop: Boolean?): AABar {
|
||||
grouping = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointPadding(prop: Float?): AABar {
|
||||
pointPadding = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointPlacement(prop: Float?): AABar {
|
||||
pointPlacement = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun groupPadding(prop: Float?): AABar {
|
||||
groupPadding = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AABar {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun colorByPoint(prop: Boolean?): AABar {
|
||||
colorByPoint = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AABar {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun stacking(prop: String): AABar {
|
||||
stacking = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadius(prop: Number?): AABar {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun yAxis(prop: Int?): AABar {
|
||||
yAxis = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
open class AALine {
|
||||
var dataLabels: AADataLabels? = null
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AALine {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
open class AASpline {
|
||||
var dataLabels: AADataLabels? = null
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AASpline {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
open class AAArea {
|
||||
var dataLabels: AADataLabels? = null
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AAArea {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
open class AAAreaspline {
|
||||
var dataLabels: AADataLabels? = null
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AAAreaspline {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
open class AAPie {
|
||||
var type: String? = null
|
||||
var dataLabels: AADataLabels? = null
|
||||
var size: Number? = null
|
||||
var allowPointSelect: Boolean? = null
|
||||
var cursor: String? = null
|
||||
var showInLegend: Boolean? = null
|
||||
var startAngle: Number? = null
|
||||
var endAngle: Number? = null
|
||||
var depth: Number? = null
|
||||
var center: Any? = null
|
||||
var data: Array<Any>? = null
|
||||
|
||||
|
||||
fun type(prop: AAChartType?): AAPie {
|
||||
type = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AAPie {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun size(prop: Number?): AAPie {
|
||||
size = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun allowPointSelect(prop: Boolean?): AAPie {
|
||||
allowPointSelect = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun cursor(prop: String): AAPie {
|
||||
cursor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun showInLegend(prop: Boolean?): AAPie {
|
||||
showInLegend = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun startAngle(prop: Number?): AAPie {
|
||||
startAngle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun endAngle(prop: Number?): AAPie {
|
||||
endAngle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun depth(prop: Number?): AAPie {
|
||||
depth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun center(prop: Any?): AAPie {
|
||||
center = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun data(prop: Array<Any>): AAPie {
|
||||
data = prop
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
open class AAColumnrange {
|
||||
var borderRadius: Number? = null
|
||||
var borderWidth: Number? = null
|
||||
var dataLabels: AADataLabels? = null
|
||||
|
||||
fun borderRadius(prop: Number?): AAColumnrange {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AAColumnrange {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AAColumnrange {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
open class AAArearange {
|
||||
var dataLabels: AADataLabels? = null
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AAArearange {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
open class AAScatter {
|
||||
var lineWidth: Number? = null
|
||||
var lineColor: String? = null
|
||||
var dashStyle: String? = null
|
||||
var enableMouseTracking: Any? = null
|
||||
var linkedTo: String? = null
|
||||
var states: AAStates? = null
|
||||
var marker: AAMarker? = null
|
||||
fun lineWidth(prop: Number?): AAScatter {
|
||||
lineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineColor(prop: String?): AAScatter {
|
||||
lineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dashStyle(prop: AAChartLineDashStyleType?): AAScatter {
|
||||
dashStyle = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun enableMouseTracking(prop: Any?): AAScatter {
|
||||
enableMouseTracking = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun linkedTo(prop: String?): AAScatter {
|
||||
linkedTo = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun states(prop: AAStates?): AAScatter {
|
||||
states = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun marker(prop: AAMarker?): AAScatter {
|
||||
marker = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
class AAScrollablePlotArea {
|
||||
var minHeight: Number? = null
|
||||
var minWidth: Number? = null
|
||||
var opacity: Float? = null
|
||||
var scrollPositionX: Number? = null
|
||||
var scrollPositionY: Number? = null
|
||||
|
||||
|
||||
fun minHeight(prop: Number?): AAScrollablePlotArea {
|
||||
minHeight = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minWidth(prop: Number?): AAScrollablePlotArea {
|
||||
minWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun opacity(prop: Float?): AAScrollablePlotArea {
|
||||
opacity = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun scrollPositionX(prop: Number?): AAScrollablePlotArea {
|
||||
scrollPositionX = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun scrollPositionY(prop: Number?): AAScrollablePlotArea {
|
||||
scrollPositionY = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+230
@@ -0,0 +1,230 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AASeries
|
||||
* Author: ios-fn
|
||||
* Date: 2019-08-30 11:32
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartStackingType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAShadow
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
|
||||
|
||||
class AASeries {
|
||||
var borderColor //The border color, It is only valid for column, bar, pie, columnrange, pyramid and funnel chart types
|
||||
: String? = null
|
||||
var borderWidth //The border width, It is only valid for column, bar, pie, columnrange, pyramid and funnel chart types
|
||||
: Number? = null
|
||||
var borderRadius //The corner radius of the border surrounding each column or bar.
|
||||
: Number? = null
|
||||
var borderRadiusTopLeft: Any? = null
|
||||
var borderRadiusTopRight: Any? = null
|
||||
var borderRadiusBottomLeft: Any? = null
|
||||
var borderRadiusBottomRight: Any? = null
|
||||
var marker: AAMarker? = null
|
||||
var stacking: String? = null
|
||||
var animation: AAAnimation? = null
|
||||
var keys: Array<String>? = null
|
||||
var colorByPoint: Boolean? = null//决定了图表是否给每个数据列或每个点分配一个颜色,默认值是 false, 即默认是给每个数据类分配颜色,
|
||||
var connectNulls: Boolean? = null//设置折线是否断点重连
|
||||
var events: AASeriesEvents? = null
|
||||
var shadow: AAShadow? = null
|
||||
var dataLabels: AADataLabels? = null
|
||||
var states: AAStates? = null
|
||||
var point: AAPoint? = null
|
||||
var pointInterval: Int? = null
|
||||
var pointIntervalUnit: String? = null
|
||||
var pointPlacement: Any? = null
|
||||
var pointStart: Number? = null
|
||||
|
||||
fun borderColor(prop: String?): AASeries {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AASeries {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadius(prop: Number?): AASeries {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadiusTopLeft(prop: Any?): AASeries {
|
||||
borderRadiusTopLeft = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadiusTopRight(prop: Any?): AASeries {
|
||||
borderRadiusTopRight = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadiusBottomLeft(prop: Any?): AASeries {
|
||||
borderRadiusBottomLeft = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadiusBottomRight(prop: Any?): AASeries {
|
||||
borderRadiusBottomRight = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun marker(prop: AAMarker): AASeries {
|
||||
marker = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun stacking(prop: AAChartStackingType?): AASeries {
|
||||
stacking = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun animation(prop: AAAnimation): AASeries {
|
||||
animation = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun keys(prop: Array<String>): AASeries {
|
||||
keys = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun colorByPoint(prop: Boolean?): AASeries {
|
||||
colorByPoint = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun connectNulls(prop: Boolean?): AASeries {
|
||||
connectNulls = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun events(prop: AASeriesEvents): AASeries {
|
||||
events = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun shadow(prop: AAShadow): AASeries {
|
||||
shadow = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dataLabels(prop: AADataLabels): AASeries {
|
||||
dataLabels = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun states(prop: AAStates): AASeries {
|
||||
states = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun point(prop: AAPoint): AASeries {
|
||||
point = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointInterval(prop: Int): AASeries {
|
||||
pointInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointIntervalUnit(prop: String): AASeries {
|
||||
pointIntervalUnit = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointPlacement(prop: Any): AASeries {
|
||||
pointPlacement = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointStart(prop: Number): AASeries {
|
||||
pointStart = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AASeriesEvents {
|
||||
var legendItemClick: String? = null
|
||||
|
||||
fun legendItemClick(prop: String): AASeriesEvents {
|
||||
legendItemClick = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AAPoint {
|
||||
var events: AAPointEvents? = null
|
||||
|
||||
fun events(prop: AAPointEvents): AAPoint {
|
||||
events = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AAPointEvents {
|
||||
var click //点击事件
|
||||
: String? = null
|
||||
var mouseOut //鼠标划出
|
||||
: String? = null
|
||||
var mouseOver //鼠标划过
|
||||
: String? = null
|
||||
var remove //删除
|
||||
: String? = null
|
||||
var select //选中
|
||||
: String? = null
|
||||
var unselect //取消选中
|
||||
: String? = null
|
||||
var update //更新
|
||||
: String? = null
|
||||
var legendItemClick //图例点击事件
|
||||
: String? = null
|
||||
|
||||
|
||||
fun click(prop: String?): AAPointEvents {
|
||||
click = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun mouseOut(prop: String?): AAPointEvents {
|
||||
mouseOut = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun mouseOver(prop: String?): AAPointEvents {
|
||||
mouseOver = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun remove(prop: String?): AAPointEvents {
|
||||
remove = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun select(prop: String?): AAPointEvents {
|
||||
select = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun unselect(prop: String?): AAPointEvents {
|
||||
unselect = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun update(prop: String?): AAPointEvents {
|
||||
update = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun legendItemClick(prop: String?): AAPointEvents {
|
||||
legendItemClick = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAShadow
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:31
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
class AAShadow {
|
||||
private var color: String? = null
|
||||
private var offsetX: Number? = null
|
||||
private var offsetY: Number? = null
|
||||
private var opacity: Float? = null
|
||||
private var width: Number? = null
|
||||
|
||||
fun color(prop: String): AAShadow {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun offsetX(prop: Number?): AAShadow {
|
||||
offsetX = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun offsetY(prop: Number?): AAShadow {
|
||||
offsetY = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun opacity(prop: Float?): AAShadow {
|
||||
opacity = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun width(prop: Number?): AAShadow {
|
||||
width = prop
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2020,
|
||||
* FileName: AAStates
|
||||
* Author: AnAn
|
||||
* Date: 2020-01-29 23:53
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
class AAStates {
|
||||
var hover: AAHover? = null
|
||||
var select: AASelect? = null
|
||||
var inactive: AAInactive? = null
|
||||
|
||||
fun hover(prop: AAHover?): AAStates {
|
||||
hover = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun select(prop: AASelect?): AAStates {
|
||||
select = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun inactive(prop: AAInactive?): AAStates {
|
||||
inactive = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AAHover {
|
||||
var enabled: Boolean? = null
|
||||
var borderColor: String? = null
|
||||
var brightness: Float? = null
|
||||
var color: String? = null
|
||||
var halo: AAHalo? = null
|
||||
var lineWidth: Number? = null
|
||||
var lineWidthPlus: Number? = null
|
||||
|
||||
fun enabled(prop: Boolean?): AAHover {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderColor(prop: String?): AAHover {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun brightness(prop: Float?): AAHover {
|
||||
brightness = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: String?): AAHover {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun halo(prop: AAHalo?): AAHover {
|
||||
halo = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidth(prop: Number?): AAHover {
|
||||
lineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidthPlus(prop: Number?): AAHover {
|
||||
lineWidthPlus = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AASelect {
|
||||
var borderColor: String? = null
|
||||
var color: String? = null
|
||||
var halo: AAHalo? = null
|
||||
|
||||
fun borderColor(prop: String?): AASelect {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: String?): AASelect {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun halo(prop: AAHalo?): AASelect {
|
||||
halo = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AAHalo {
|
||||
var attributes: Map<String, *>? = null
|
||||
var opacity: Float? = null
|
||||
var size: Number? = null
|
||||
|
||||
fun attributes(prop: AASVGAttributes?): AAHalo {
|
||||
attributes = prop?.toDic()
|
||||
return this
|
||||
}
|
||||
|
||||
fun opacity(prop: Float?): AAHalo {
|
||||
opacity = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun size(prop: Number?): AAHalo {
|
||||
size = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AAInactive {
|
||||
var enabled: Boolean? = null
|
||||
var opacity: Number? = null
|
||||
fun enabled(prop: Boolean?): AAInactive {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun opacity(prop: Number?): AAInactive {
|
||||
opacity = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
class AASVGAttributes {
|
||||
var fill: String? = null
|
||||
var stroke: String? = null
|
||||
var strokeWidth: Number? = null
|
||||
|
||||
fun fill(prop: String?): AASVGAttributes {
|
||||
fill = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun stroke(prop: String?): AASVGAttributes {
|
||||
stroke = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun strokeWidth(prop: Number?): AASVGAttributes {
|
||||
strokeWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
// convert to dictionary in kotlin with let
|
||||
fun toDic(): Map<String, Any> {
|
||||
val dic: MutableMap<String, Any> = HashMap()
|
||||
strokeWidth?.let { dic["stroke-width"] = it }
|
||||
fill?.let { dic["fill"] = it }
|
||||
stroke?.let { dic["stroke"] = it }
|
||||
return dic
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAStyle
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:17
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartFontWeightType
|
||||
|
||||
|
||||
class AAStyle {
|
||||
var background: String? = null
|
||||
var backgroundColor: String? = null
|
||||
var border: String? = null
|
||||
var borderRadius: String? = null
|
||||
var color: String? = null
|
||||
var cursor: String? = null
|
||||
var fontFamily: String? = null
|
||||
var fontSize: String? = null
|
||||
var fontWeight: String? = null
|
||||
var height: Number? = null
|
||||
var lineWidth: Number? = null
|
||||
var opacity: Number? = null
|
||||
var padding: String? = null
|
||||
var pointerEvents: String? = null
|
||||
var position: String? = null
|
||||
var textAlign: String? = null
|
||||
var textDecoration: String? = null
|
||||
var textOutline: String? = null
|
||||
var textOverflow: String? = null
|
||||
var top: String? = null
|
||||
var transition: String? = null
|
||||
var whiteSpace: String? = null
|
||||
var width: Number? = null
|
||||
|
||||
|
||||
fun background(prop: String?): AAStyle {
|
||||
background = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun backgroundColor(prop: String?): AAStyle {
|
||||
backgroundColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun border(prop: String?): AAStyle {
|
||||
border = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadius(prop: Number?): AAStyle {
|
||||
prop?.let {
|
||||
borderRadius = "${prop}px"
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: String?): AAStyle {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun cursor(prop: String?): AAStyle {
|
||||
cursor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun fontFamily(prop: String?): AAStyle {
|
||||
fontFamily = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun fontSize(prop: Number?): AAStyle {
|
||||
prop?.let {
|
||||
fontSize = "${prop}px"
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
fun fontWeight(prop: AAChartFontWeightType?): AAStyle {
|
||||
fontWeight = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun height(prop: Number?): AAStyle {
|
||||
height = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidth(prop: Number?): AAStyle {
|
||||
lineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun opacity(prop: Number?): AAStyle {
|
||||
opacity = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun padding(prop: Number?): AAStyle {
|
||||
prop?.let {
|
||||
padding = "${prop}px"
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointerEvents(prop: String?): AAStyle {
|
||||
pointerEvents = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun position(prop: String?): AAStyle {
|
||||
position = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun textAlign(prop: String?): AAStyle {
|
||||
textAlign = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun textDecoration(prop: String?): AAStyle {
|
||||
textDecoration = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun textOutline(prop: String?): AAStyle {
|
||||
textOutline = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun textOverflow(prop: String?): AAStyle {
|
||||
textOverflow = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun top(prop: String?): AAStyle {
|
||||
top = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun transition(prop: String?): AAStyle {
|
||||
transition = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun whiteSpace(prop: String?): AAStyle {
|
||||
whiteSpace = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun width(prop: Number?): AAStyle {
|
||||
width = prop
|
||||
return this
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun style(
|
||||
color: String?
|
||||
): AAStyle {
|
||||
return style(color, null)
|
||||
}
|
||||
|
||||
fun style(
|
||||
color: String?,
|
||||
fontSize: Number?
|
||||
): AAStyle {
|
||||
return style(color, fontSize, null)
|
||||
}
|
||||
|
||||
fun style(
|
||||
color: String?,
|
||||
fontSize: Number?,
|
||||
fontWeight: AAChartFontWeightType?
|
||||
): AAStyle {
|
||||
return style(color, fontSize, fontWeight, null)
|
||||
}
|
||||
|
||||
fun style(
|
||||
color: String?,
|
||||
fontSize: Number?,
|
||||
fontWeight: AAChartFontWeightType?,
|
||||
textOutline: String?
|
||||
): AAStyle {
|
||||
return AAStyle()
|
||||
.color(color)
|
||||
.fontSize(fontSize)
|
||||
.fontWeight(fontWeight)
|
||||
.textOutline(textOutline)
|
||||
}
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AASubtitle
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:29
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartVerticalAlignType
|
||||
|
||||
|
||||
class AASubtitle {
|
||||
private var text: String? = null
|
||||
private var style: AAStyle? = null
|
||||
private var align: String? = null
|
||||
private var verticalAlign: String? = null
|
||||
private var x: Number? = null
|
||||
private var y: Number? = null
|
||||
private var userHTML: Boolean? = null
|
||||
|
||||
fun text(prop: String?): AASubtitle {
|
||||
text = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun style(prop: AAStyle?): AASubtitle {
|
||||
style = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun align(prop: AAChartAlignType?): AASubtitle {
|
||||
align = prop?.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun verticalAlign(prop: AAChartVerticalAlignType): AASubtitle {
|
||||
verticalAlign = prop.toString()
|
||||
return this
|
||||
}
|
||||
|
||||
fun x(prop: Number?): AASubtitle {
|
||||
x = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun y(prop: Number?): AASubtitle {
|
||||
y = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun userHTML(prop: Boolean?): AASubtitle {
|
||||
userHTML = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AATitle
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:26
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAlignType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartVerticalAlignType
|
||||
|
||||
class AATitle {
|
||||
private var text: String? = null
|
||||
private var style: AAStyle? = null
|
||||
private var align: String? = null
|
||||
private var verticalAlign: String? = null
|
||||
private var x: Number? = null
|
||||
private var y: Number? = null
|
||||
private var userHTML: Boolean? = null
|
||||
|
||||
fun text(prop: String?): AATitle {
|
||||
text = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun style(prop: AAStyle?): AATitle {
|
||||
style = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun align(prop: AAChartAlignType): AATitle {
|
||||
align = prop.toString()
|
||||
return this
|
||||
}
|
||||
|
||||
fun verticalAlign(prop: AAChartVerticalAlignType): AATitle {
|
||||
verticalAlign = prop.toString()
|
||||
return this
|
||||
}
|
||||
|
||||
fun x(prop: Number?): AATitle {
|
||||
x = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun y(prop: Number?): AATitle {
|
||||
y = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun userHTML(prop: Boolean?): AATitle {
|
||||
userHTML = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AATooltip
|
||||
* Author: ios-fn
|
||||
* Date: 2019-06-16 19:04
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
|
||||
|
||||
|
||||
class AATooltip {
|
||||
var backgroundColor: Any? = null
|
||||
var borderColor: String? = null
|
||||
var borderRadius: Number? = null
|
||||
var borderWidth: Number? = null
|
||||
var style: AAStyle? = null
|
||||
var shape: String? = null
|
||||
var enabled: Boolean? = null
|
||||
var useHTML: Boolean? = null
|
||||
var formatter: String? = null
|
||||
var headerFormat: String? = null
|
||||
var pointFormat: String? = null
|
||||
var footerFormat: String? = null
|
||||
var valueDecimals: Int? = null
|
||||
var shared: Boolean? = null
|
||||
var valueSuffix: String? = null
|
||||
var followTouchMove: Boolean? = null //https://api.highcharts.com.cn/highcharts#chart.panning
|
||||
var shadow: Boolean? = null
|
||||
var padding: Number? = null
|
||||
var pointFormatter: String? = null
|
||||
var positioner: String? = null
|
||||
var dateTimeLabelFormats: AADateTimeLabelFormats? = null
|
||||
|
||||
fun backgroundColor(prop: Any): AATooltip {
|
||||
backgroundColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderColor(prop: String): AATooltip {
|
||||
borderColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderRadius(prop: Number?): AATooltip {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun borderWidth(prop: Number?): AATooltip {
|
||||
borderWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun style(prop: AAStyle): AATooltip {
|
||||
style = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun shape(prop: String): AATooltip {
|
||||
shape = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun enabled(prop: Boolean?): AATooltip {
|
||||
enabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun useHTML(prop: Boolean?): AATooltip {
|
||||
useHTML = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun formatter(prop: String): AATooltip {
|
||||
formatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun headerFormat(prop: String): AATooltip {
|
||||
headerFormat = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointFormat(prop: String): AATooltip {
|
||||
pointFormat = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun footerFormat(prop: String): AATooltip {
|
||||
footerFormat = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun valueDecimals(prop: Int?): AATooltip {
|
||||
valueDecimals = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun shared(prop: Boolean?): AATooltip {
|
||||
shared = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun valueSuffix(prop: String?): AATooltip {
|
||||
valueSuffix = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun followTouchMove(prop: Boolean): AATooltip {
|
||||
followTouchMove = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun shadow(prop: Boolean): AATooltip {
|
||||
shadow = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun padding(prop: Number): AATooltip {
|
||||
padding = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun pointFormatter(prop: String): AATooltip {
|
||||
pointFormatter = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun positioner(prop: String): AATooltip {
|
||||
positioner = AAJSStringPurer.pureAnonymousJSFunctionString(prop)
|
||||
return this
|
||||
}
|
||||
|
||||
fun dateTimeLabelFormats(prop: AADateTimeLabelFormats): AATooltip {
|
||||
dateTimeLabelFormats = prop
|
||||
return this
|
||||
}
|
||||
|
||||
init {
|
||||
shared = true
|
||||
enabled = true
|
||||
shadow = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+232
@@ -0,0 +1,232 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAXAxis
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:20
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
|
||||
open class AAXAxis: AAAxis() {
|
||||
fun allowDecimals(prop: Boolean?): AAXAxis {
|
||||
allowDecimals = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun alternateGridColor(prop: Any): AAXAxis {
|
||||
alternateGridColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun crosshair(prop: AACrosshair): AAXAxis {
|
||||
crosshair = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun title(prop: AATitle): AAXAxis {
|
||||
title = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun type(prop: AAChartAxisType): AAXAxis {
|
||||
type = prop.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun dateTimeLabelFormats(prop: AADateTimeLabelFormats): AAXAxis {
|
||||
dateTimeLabelFormats = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun plotBands(prop: Array<AAPlotBandsElement>): AAXAxis {
|
||||
plotBands = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun plotLines(prop: Array<AAPlotLinesElement>): AAXAxis {
|
||||
plotLines = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun categories(prop: Array<String>?): AAXAxis {
|
||||
categories = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun linkedTo(prop: Int?): AAXAxis {
|
||||
linkedTo = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun reversed(prop: Boolean?): AAXAxis {
|
||||
reversed = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun reversedStacks(prop: Boolean?): AAXAxis {
|
||||
reversedStacks = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gridLineWidth(prop: Number?): AAXAxis {
|
||||
gridLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gridLineColor(prop: String): AAXAxis {
|
||||
gridLineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gridLineDashStyle(prop: String): AAXAxis {
|
||||
gridLineDashStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gridLineInterpolation(prop: String): AAXAxis {
|
||||
gridLineInterpolation = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun labels(prop: AALabels): AAXAxis {
|
||||
labels = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidth(prop: Number?): AAXAxis {
|
||||
lineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineColor(prop: String): AAXAxis {
|
||||
lineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun offset(prop: Number?): AAXAxis {
|
||||
offset = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun max(prop: Number?): AAXAxis {
|
||||
max = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun min(prop: Number?): AAXAxis {
|
||||
min = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minRange(prop: Int?): AAXAxis {
|
||||
minRange = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minTickInterval(prop: Int?): AAXAxis {
|
||||
minTickInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTicks(prop: Boolean?): AAXAxis {
|
||||
minorTicks = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorGridLineColor(prop: String?): AAXAxis {
|
||||
minorGridLineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorGridLineDashStyle(prop: String?): AAXAxis {
|
||||
minorGridLineDashStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorGridLineWidth(prop: Number?): AAXAxis {
|
||||
minorGridLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickColor(prop: String?): AAXAxis {
|
||||
minorTickColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickInterval(prop: Any?): AAXAxis {
|
||||
minorTickInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickLength(prop: Number?): AAXAxis {
|
||||
minorTickLength = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickPosition(prop: String?): AAXAxis {
|
||||
minorTickPosition = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickWidth(prop: Number?): AAXAxis {
|
||||
minorTickWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun visible(prop: Boolean?): AAXAxis {
|
||||
visible = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun startOnTick(prop: Boolean?): AAXAxis {
|
||||
startOnTick = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun endOnTick(prop: Boolean?): AAXAxis {
|
||||
endOnTick = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun opposite(prop: Boolean?): AAXAxis {
|
||||
opposite = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickColor(prop: String?): AAXAxis {
|
||||
tickColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickPositions(prop: Array<Any>): AAXAxis {
|
||||
tickPositions = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickInterval(prop: Number?): AAXAxis {
|
||||
tickInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickmarkPlacement(prop: String): AAXAxis {
|
||||
tickmarkPlacement = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickWidth(prop: Number?): AAXAxis {
|
||||
tickWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickLength(prop: Number?): AAXAxis {
|
||||
tickLength = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickPosition(prop: String): AAXAxis {
|
||||
tickPosition = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
/**
|
||||
* Copyright (C), 2015-2019
|
||||
* FileName: AAYAxis
|
||||
* Author: AnAn
|
||||
* Date: 2019-08-30 11:25
|
||||
* Description:
|
||||
* History:
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
open class AAYAxis: AAAxis() {
|
||||
var stackLabels: Any? = null
|
||||
fun stackLabels(prop: Any?): AAYAxis {
|
||||
stackLabels = prop
|
||||
return this
|
||||
}
|
||||
//////////////////////////////////////////////
|
||||
|
||||
fun allowDecimals(prop: Boolean?): AAYAxis {
|
||||
allowDecimals = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun alternateGridColor(prop: Any): AAYAxis {
|
||||
alternateGridColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun crosshair(prop: AACrosshair): AAYAxis {
|
||||
crosshair = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun title(prop: AATitle): AAYAxis {
|
||||
title = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun type(prop: AAChartAxisType): AAYAxis {
|
||||
type = prop.value
|
||||
return this
|
||||
}
|
||||
|
||||
fun dateTimeLabelFormats(prop: AADateTimeLabelFormats): AAYAxis {
|
||||
dateTimeLabelFormats = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun plotBands(prop: Array<AAPlotBandsElement>): AAYAxis {
|
||||
plotBands = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun plotLines(prop: Array<AAPlotLinesElement>): AAYAxis {
|
||||
plotLines = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun categories(prop: Array<String>?): AAYAxis {
|
||||
categories = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun linkedTo(prop: Int?): AAYAxis {
|
||||
linkedTo = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun reversed(prop: Boolean?): AAYAxis {
|
||||
reversed = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun reversedStacks(prop: Boolean?): AAYAxis {
|
||||
reversedStacks = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gridLineWidth(prop: Number?): AAYAxis {
|
||||
gridLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gridLineColor(prop: String): AAYAxis {
|
||||
gridLineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gridLineDashStyle(prop: String): AAYAxis {
|
||||
gridLineDashStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun gridLineInterpolation(prop: String): AAYAxis {
|
||||
gridLineInterpolation = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun labels(prop: AALabels): AAYAxis {
|
||||
labels = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineWidth(prop: Number?): AAYAxis {
|
||||
lineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun lineColor(prop: String): AAYAxis {
|
||||
lineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun offset(prop: Number?): AAYAxis {
|
||||
offset = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun max(prop: Number?): AAYAxis {
|
||||
max = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun min(prop: Number?): AAYAxis {
|
||||
min = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minRange(prop: Int?): AAYAxis {
|
||||
minRange = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minTickInterval(prop: Int?): AAYAxis {
|
||||
minTickInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTicks(prop: Boolean?): AAYAxis {
|
||||
minorTicks = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorGridLineColor(prop: String?): AAYAxis {
|
||||
minorGridLineColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorGridLineDashStyle(prop: String?): AAYAxis {
|
||||
minorGridLineDashStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorGridLineWidth(prop: Number?): AAYAxis {
|
||||
minorGridLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickColor(prop: String?): AAYAxis {
|
||||
minorTickColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickInterval(prop: Any?): AAYAxis {
|
||||
minorTickInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickLength(prop: Number?): AAYAxis {
|
||||
minorTickLength = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickPosition(prop: String?): AAYAxis {
|
||||
minorTickPosition = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun minorTickWidth(prop: Number?): AAYAxis {
|
||||
minorTickWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun visible(prop: Boolean?): AAYAxis {
|
||||
visible = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun startOnTick(prop: Boolean?): AAYAxis {
|
||||
startOnTick = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun endOnTick(prop: Boolean?): AAYAxis {
|
||||
endOnTick = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun opposite(prop: Boolean?): AAYAxis {
|
||||
opposite = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickColor(prop: String?): AAYAxis {
|
||||
tickColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickPositions(prop: Array<Any>): AAYAxis {
|
||||
tickPositions = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickInterval(prop: Number?): AAYAxis {
|
||||
tickInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickmarkPlacement(prop: String): AAYAxis {
|
||||
tickmarkPlacement = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickWidth(prop: Number?): AAYAxis {
|
||||
tickWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickLength(prop: Number?): AAYAxis {
|
||||
tickLength = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun tickPosition(prop: String): AAYAxis {
|
||||
tickPosition = prop
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.github.aachartmodel.aainfographics.aaoptionsmodel
|
||||
|
||||
class AAZonesElement {
|
||||
var value: Number? = null
|
||||
var color: Any? = null
|
||||
var fillColor: Any? = null
|
||||
var dashStyle: String? = null
|
||||
|
||||
fun value(prop: Number?): AAZonesElement {
|
||||
value = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun color(prop: Any?): AAZonesElement {
|
||||
color = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun fillColor(prop: Any?): AAZonesElement {
|
||||
fillColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun dashStyle(prop: String?): AAZonesElement {
|
||||
dashStyle = prop
|
||||
return this
|
||||
}
|
||||
}
|
||||
+461
@@ -0,0 +1,461 @@
|
||||
package com.github.aachartmodel.aainfographics.aatools
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.AAScrollablePlotArea
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.AAStyle
|
||||
|
||||
/**
|
||||
* This AABuilder can help you set strings and dimensions from application resources. It enforces
|
||||
* stricter typing than AAChartModel to prevent you from setting invalid values.
|
||||
*/
|
||||
class AABuilder(context: Context) {
|
||||
private val applicationContext = context.applicationContext
|
||||
private val resources = applicationContext.resources
|
||||
|
||||
private var animationType: AAChartAnimationType? = AAChartAnimationType.Linear
|
||||
private var animationDuration: Int? = 500
|
||||
private var title: String? = ""
|
||||
private var titleStyle: AAStyle? = null
|
||||
private var subtitle: String? = ""
|
||||
private var subtitleAlign: AAChartAlignType? = null
|
||||
private var subtitleStyle: AAStyle? = null
|
||||
private var axesTextColor: String? = null
|
||||
private var chartType: AAChartType? = AAChartType.Line
|
||||
private var stacking: AAChartStackingType? = AAChartStackingType.False
|
||||
private var markerRadius: Number? = 6f
|
||||
private var markerSymbol: AAChartSymbolType? = null
|
||||
private var markerSymbolStyle: AAChartSymbolStyleType? = AAChartSymbolStyleType.Normal
|
||||
private var zoomType: AAChartZoomType? = AAChartZoomType.None
|
||||
private var inverted: Boolean? = false
|
||||
private var xAxisReversed: Boolean? = false
|
||||
private var yAxisReversed: Boolean? = false
|
||||
private var tooltipEnabled: Boolean? = null
|
||||
private var tooltipValueSuffix: String? = null
|
||||
private var gradientColorEnable: Boolean? = false
|
||||
private var polar: Boolean? = false
|
||||
private var margin: Array<Number>? = null
|
||||
private var dataLabelsEnabled: Boolean? = false
|
||||
private var dataLabelsStyle: AAStyle? = null
|
||||
private var xAxisLabelsEnabled: Boolean? = true
|
||||
private var xAxisTickInterval: Int? = null
|
||||
private var categories: Array<String>? = null
|
||||
private var xAxisGridLineWidth: Number? = 0f
|
||||
private var xAxisVisible: Boolean? = null
|
||||
private var yAxisVisible: Boolean? = null
|
||||
private var yAxisLabelsEnabled: Boolean? = true
|
||||
private var yAxisTitle: String? = null
|
||||
private var yAxisLineWidth: Number? = null
|
||||
private var yAxisMin: Number? = null
|
||||
private var yAxisMax: Number? = null
|
||||
private var yAxisAllowDecimals: Boolean? = null
|
||||
private var yAxisGridLineWidth: Number? = 1f
|
||||
private var colorsTheme: Array<Any>? = arrayOf("#fe117c", "#ffc069", "#06caf4", "#7dffc0")
|
||||
private var legendEnabled: Boolean? = true
|
||||
private var backgroundColor: Any? = "#ffffff"
|
||||
private var borderRadius: Number? = 0f
|
||||
private var series: Array<Any>? = null
|
||||
private var touchEventEnabled: Boolean? = null
|
||||
private var scrollablePlotArea: AAScrollablePlotArea? = null
|
||||
|
||||
constructor(context: Context, source: AAChartModel) : this(context) {
|
||||
set(source)
|
||||
}
|
||||
|
||||
private fun getString(id: Int, vararg formatArgs: Any?): String =
|
||||
resources.getString(id, formatArgs)
|
||||
|
||||
private fun getColor(colorResId: Int): Int {
|
||||
return if (Build.VERSION.SDK_INT >= 23) {
|
||||
applicationContext.getColor(colorResId)
|
||||
} else {
|
||||
resources.getColor(colorResId)
|
||||
}
|
||||
}
|
||||
|
||||
private fun Int.toColorString() = String.format("#%06X", 0xFFFFFF and this)
|
||||
|
||||
private fun getDimen(dimenResId: Int): Float {
|
||||
return resources.getDimension(dimenResId)
|
||||
}
|
||||
|
||||
fun set(prop: AAChartModel): AABuilder {
|
||||
animationType = prop.animationType
|
||||
animationDuration = prop.animationDuration
|
||||
title = prop.title
|
||||
titleStyle = prop.titleStyle
|
||||
subtitle = prop.subtitle
|
||||
subtitleAlign = prop.subtitleAlign
|
||||
subtitleStyle = prop.subtitleStyle
|
||||
axesTextColor = prop.axesTextColor
|
||||
chartType = prop.chartType
|
||||
stacking = prop.stacking
|
||||
markerRadius = prop.markerRadius
|
||||
markerSymbol = prop.markerSymbol
|
||||
markerSymbolStyle = prop.markerSymbolStyle
|
||||
zoomType = prop.zoomType
|
||||
inverted = prop.inverted
|
||||
xAxisReversed = prop.xAxisReversed
|
||||
yAxisReversed = prop.yAxisReversed
|
||||
tooltipEnabled = prop.tooltipEnabled
|
||||
tooltipValueSuffix = prop.tooltipValueSuffix
|
||||
gradientColorEnable = prop.gradientColorEnable
|
||||
polar = prop.polar
|
||||
margin = prop.margin
|
||||
dataLabelsEnabled = prop.dataLabelsEnabled
|
||||
dataLabelsStyle = prop.dataLabelsStyle
|
||||
xAxisLabelsEnabled = prop.xAxisLabelsEnabled
|
||||
xAxisTickInterval = prop.xAxisTickInterval
|
||||
categories = prop.categories
|
||||
xAxisGridLineWidth = prop.xAxisGridLineWidth
|
||||
xAxisVisible = prop.xAxisVisible
|
||||
yAxisVisible = prop.yAxisVisible
|
||||
yAxisLabelsEnabled = prop.yAxisLabelsEnabled
|
||||
yAxisTitle = prop.yAxisTitle
|
||||
yAxisLineWidth = prop.yAxisLineWidth
|
||||
yAxisMin = prop.yAxisMin
|
||||
yAxisMax = prop.yAxisMax
|
||||
yAxisAllowDecimals = prop.yAxisAllowDecimals
|
||||
yAxisGridLineWidth = prop.yAxisGridLineWidth
|
||||
colorsTheme = prop.colorsTheme
|
||||
legendEnabled = prop.legendEnabled
|
||||
backgroundColor = prop.backgroundColor
|
||||
borderRadius = prop.borderRadius
|
||||
series = prop.series
|
||||
touchEventEnabled = prop.touchEventEnabled
|
||||
scrollablePlotArea = prop.scrollablePlotArea
|
||||
return this
|
||||
}
|
||||
|
||||
fun setAnimationType(prop: AAChartAnimationType): AABuilder {
|
||||
animationType = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setAnimationDuration(prop: Int): AABuilder {
|
||||
animationDuration = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setTitle(prop: String): AABuilder {
|
||||
title = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setTitle(id: Int, vararg formatArgs: Any?): AABuilder =
|
||||
setTitle(getString(id, formatArgs))
|
||||
|
||||
fun setTitleStyle(prop: AAStyle): AABuilder {
|
||||
titleStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setSubtitle(prop: String): AABuilder {
|
||||
subtitle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setSubtitle(id: Int, vararg formatArgs: Any?): AABuilder =
|
||||
setSubtitle(getString(id, formatArgs))
|
||||
|
||||
fun setSubtitleAlign(prop: AAChartAlignType): AABuilder {
|
||||
subtitleAlign = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setSubtitleStyle(prop: AAStyle): AABuilder {
|
||||
subtitleStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setAxesTextColor(prop: String): AABuilder {
|
||||
axesTextColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setAxesTextColor(color: Int): AABuilder = setAxesTextColor(color.toColorString())
|
||||
|
||||
fun setAxesTextColorRes(colorResId: Int): AABuilder =
|
||||
setAxesTextColor(getColor(colorResId).toColorString())
|
||||
|
||||
fun setChartType(prop: AAChartType): AABuilder {
|
||||
chartType = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setStacking(prop: AAChartStackingType): AABuilder {
|
||||
stacking = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setMarkerRadius(prop: Number): AABuilder {
|
||||
markerRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setMarkerRadiusRes(dimenResId: Int): AABuilder = setMarkerRadius(getDimen(dimenResId))
|
||||
|
||||
fun setMarkerSymbol(prop: AAChartSymbolType): AABuilder {
|
||||
markerSymbol = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setMarkerSymbolStyle(prop: AAChartSymbolStyleType): AABuilder {
|
||||
markerSymbolStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setZoomType(prop: AAChartZoomType): AABuilder {
|
||||
zoomType = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setInverted(prop: Boolean): AABuilder {
|
||||
inverted = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setXAxisReversed(prop: Boolean): AABuilder {
|
||||
xAxisReversed = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisReversed(prop: Boolean): AABuilder {
|
||||
yAxisReversed = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setTooltipEnabled(prop: Boolean): AABuilder {
|
||||
tooltipEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setTooltipValueSuffix(prop: String): AABuilder {
|
||||
tooltipValueSuffix = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setTooltipValueSuffix(stringResId: Int, vararg formatArgs: Any?): AABuilder =
|
||||
setTooltipValueSuffix(getString(stringResId, formatArgs))
|
||||
|
||||
fun setGradientColorEnable(prop: Boolean): AABuilder {
|
||||
gradientColorEnable = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setPolar(prop: Boolean): AABuilder {
|
||||
polar = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setMargin(vararg prop: Number): AABuilder {
|
||||
margin = prop.map { it }.toTypedArray()
|
||||
return this
|
||||
}
|
||||
|
||||
fun setMargin(top: Number, left: Number, bottom: Number, right: Number): AABuilder =
|
||||
setMargin(top, left, bottom, right)
|
||||
|
||||
fun setMargin(topResId: Int, leftResId: Int, bottomResId: Int, rightResId: Int): AABuilder =
|
||||
setMargin(
|
||||
getDimen(topResId),
|
||||
getDimen(leftResId),
|
||||
getDimen(bottomResId),
|
||||
getDimen(rightResId)
|
||||
)
|
||||
|
||||
fun setDataLabelsEnabled(prop: Boolean): AABuilder {
|
||||
dataLabelsEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setDataLabelsStyle(prop: AAStyle): AABuilder {
|
||||
dataLabelsStyle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setXAxisLabelsEnabled(prop: Boolean): AABuilder {
|
||||
xAxisLabelsEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setXAxisTickInterval(prop: Int): AABuilder {
|
||||
xAxisTickInterval = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setCategories(vararg prop: String): AABuilder {
|
||||
categories = prop.map { it }.toTypedArray()
|
||||
return this
|
||||
}
|
||||
|
||||
/** Set Category labels, supports StringRes IDs */
|
||||
fun setCategories(vararg stringResIds: Int): AABuilder =
|
||||
setCategories(*stringResIds.map { stringResId -> getString(stringResId) }
|
||||
.toTypedArray())
|
||||
|
||||
fun setXAxisGridLineWidth(prop: Number): AABuilder {
|
||||
xAxisGridLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setXAxisGridLineWidth(dimenResId: Int): AABuilder =
|
||||
setXAxisGridLineWidth(getDimen(dimenResId))
|
||||
|
||||
fun setYAxisGridLineWidth(prop: Number): AABuilder {
|
||||
yAxisGridLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisGridLineWidth(dimenResId: Int): AABuilder =
|
||||
setYAxisGridLineWidth(getDimen(dimenResId))
|
||||
|
||||
fun setXAxisVisible(prop: Boolean): AABuilder {
|
||||
xAxisVisible = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisVisible(prop: Boolean): AABuilder {
|
||||
yAxisVisible = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisLabelsEnabled(prop: Boolean): AABuilder {
|
||||
yAxisLabelsEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisTitle(prop: String): AABuilder {
|
||||
yAxisTitle = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisTitle(stringResId: Int, vararg formatArgs: Any?): AABuilder =
|
||||
setYAxisTitle(getString(stringResId, formatArgs))
|
||||
|
||||
fun setYAxisLineWidth(prop: Number): AABuilder {
|
||||
yAxisLineWidth = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisLineWidth(dimenResId: Int): AABuilder =
|
||||
setYAxisLineWidth(getDimen(dimenResId))
|
||||
|
||||
fun setYAxisMin(prop: Number?): AABuilder {
|
||||
yAxisMin = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisMin(dimenResId: Int): AABuilder =
|
||||
setYAxisMin(getDimen(dimenResId))
|
||||
|
||||
fun setYAxisMax(prop: Number?): AABuilder {
|
||||
yAxisMax = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setYAxisMax(dimenResId: Int): AABuilder =
|
||||
setYAxisMax(getDimen(dimenResId))
|
||||
|
||||
fun setYAxisAllowDecimals(prop: Boolean): AABuilder {
|
||||
yAxisAllowDecimals = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setColorsTheme(prop: Array<Any>): AABuilder {
|
||||
colorsTheme = prop.map { it }.toTypedArray()
|
||||
return this
|
||||
}
|
||||
|
||||
fun setColorsTheme(vararg prop: String): AABuilder {
|
||||
colorsTheme = prop.map { it }.toTypedArray()
|
||||
return this
|
||||
}
|
||||
|
||||
/** Set theme colors, supports ColorRes IDs */
|
||||
fun setColorsTheme(vararg colorResIds: Int): AABuilder =
|
||||
setColorsTheme(*colorResIds.map { getColor(it).toColorString() }.toTypedArray())
|
||||
|
||||
fun setLegendEnabled(prop: Boolean): AABuilder {
|
||||
legendEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setBackgroundColor(prop: String): AABuilder {
|
||||
backgroundColor = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setBackgroundColor(colorResId: Int): AABuilder =
|
||||
setBackgroundColor(getColor(colorResId).toColorString())
|
||||
|
||||
fun setBorderRadius(prop: Number): AABuilder {
|
||||
borderRadius = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setBorderRadius(dimenResId: Int): AABuilder = setBorderRadius(getDimen(dimenResId))
|
||||
|
||||
fun setSeries(vararg prop: AASeriesElement): AABuilder {
|
||||
series = prop.map { it }.toTypedArray()
|
||||
return this
|
||||
}
|
||||
|
||||
fun setTouchEventEnabled(prop: Boolean): AABuilder {
|
||||
touchEventEnabled = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun setScrollablePlotArea(prop: AAScrollablePlotArea): AABuilder {
|
||||
scrollablePlotArea = prop
|
||||
return this
|
||||
}
|
||||
|
||||
fun build(): AAChartModel = AAChartModel(
|
||||
animationType = animationType,
|
||||
animationDuration = animationDuration,
|
||||
title = title,
|
||||
titleStyle = titleStyle,
|
||||
subtitle = subtitle,
|
||||
subtitleAlign = subtitleAlign,
|
||||
subtitleStyle = subtitleStyle,
|
||||
axesTextColor = axesTextColor,
|
||||
chartType = chartType,
|
||||
stacking = stacking,
|
||||
markerRadius = markerRadius,
|
||||
markerSymbol = markerSymbol,
|
||||
markerSymbolStyle = markerSymbolStyle,
|
||||
zoomType = zoomType,
|
||||
inverted = inverted,
|
||||
xAxisReversed = xAxisReversed,
|
||||
yAxisReversed = yAxisReversed,
|
||||
tooltipEnabled = tooltipEnabled,
|
||||
tooltipValueSuffix = tooltipValueSuffix,
|
||||
gradientColorEnable = gradientColorEnable,
|
||||
polar = polar,
|
||||
margin = margin,
|
||||
dataLabelsEnabled = dataLabelsEnabled,
|
||||
dataLabelsStyle = dataLabelsStyle,
|
||||
xAxisLabelsEnabled = xAxisLabelsEnabled,
|
||||
xAxisTickInterval = xAxisTickInterval,
|
||||
categories = categories,
|
||||
xAxisGridLineWidth = xAxisGridLineWidth,
|
||||
xAxisVisible = xAxisVisible,
|
||||
yAxisVisible = yAxisVisible,
|
||||
yAxisLabelsEnabled = yAxisLabelsEnabled,
|
||||
yAxisTitle = yAxisTitle,
|
||||
yAxisLineWidth = yAxisLineWidth,
|
||||
yAxisMin = yAxisMin,
|
||||
yAxisMax = yAxisMax,
|
||||
yAxisAllowDecimals = yAxisAllowDecimals,
|
||||
yAxisGridLineWidth = yAxisGridLineWidth,
|
||||
colorsTheme = colorsTheme,
|
||||
legendEnabled = legendEnabled,
|
||||
backgroundColor = backgroundColor,
|
||||
borderRadius = borderRadius,
|
||||
series = series,
|
||||
touchEventEnabled = touchEventEnabled,
|
||||
scrollablePlotArea = scrollablePlotArea,
|
||||
)
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aatools
|
||||
|
||||
fun AARgba(red: Int,
|
||||
green: Int,
|
||||
blue: Int,
|
||||
alpha: Float = 1f): String {
|
||||
return "rgba($red,$green,$blue,$alpha)"
|
||||
}
|
||||
|
||||
fun AARgb(red: Int,
|
||||
green: Int,
|
||||
blue: Int,
|
||||
alpha: Float = 1f): String {
|
||||
return AARgba(red, green, blue, 1f)
|
||||
}
|
||||
|
||||
object AAColor {
|
||||
val Black = blackColor()
|
||||
val DarkGray = darkGrayColor()
|
||||
val LightGray = lightGrayColor()
|
||||
val White = whiteColor()
|
||||
val Gray = grayColor()
|
||||
val Red = redColor()
|
||||
val Green = greenColor()
|
||||
val Blue = blueColor()
|
||||
val Cyan = cyanColor()
|
||||
val Yellow = yellowColor()
|
||||
val Magenta = magentaColor()
|
||||
val Orange = orangeColor()
|
||||
val Purple = purpleColor()
|
||||
val Brown = brownColor()
|
||||
val Clear = clearColor()
|
||||
|
||||
fun rgbaColor(
|
||||
red: Int,
|
||||
green: Int,
|
||||
blue: Int,
|
||||
alpha: Float = 1f
|
||||
): String {
|
||||
return "rgba($red,$green,$blue,$alpha)"
|
||||
}
|
||||
|
||||
private fun blackColor(): String {
|
||||
return "black"
|
||||
}
|
||||
|
||||
private fun darkGrayColor(): String {
|
||||
return "darkGray"
|
||||
}
|
||||
|
||||
private fun lightGrayColor(): String {
|
||||
return "lightGray"
|
||||
}
|
||||
|
||||
private fun whiteColor(): String {
|
||||
return "white"
|
||||
}
|
||||
|
||||
private fun grayColor(): String {
|
||||
return "gray"
|
||||
}
|
||||
|
||||
private fun redColor(): String {
|
||||
return "red"
|
||||
}
|
||||
|
||||
private fun greenColor(): String {
|
||||
return "green"
|
||||
}
|
||||
|
||||
private fun blueColor(): String {
|
||||
return "blue"
|
||||
}
|
||||
|
||||
private fun cyanColor(): String {
|
||||
return "cyan"
|
||||
}
|
||||
|
||||
private fun yellowColor(): String {
|
||||
return "yellow"
|
||||
}
|
||||
|
||||
private fun magentaColor(): String {
|
||||
return "magenta"
|
||||
}
|
||||
|
||||
private fun orangeColor(): String {
|
||||
return "orange"
|
||||
}
|
||||
|
||||
private fun purpleColor(): String {
|
||||
return "purple"
|
||||
}
|
||||
|
||||
private fun brownColor(): String {
|
||||
return "brown"
|
||||
}
|
||||
|
||||
private fun clearColor(): String {
|
||||
return "clear"
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.github.aachartmodel.aainfographics.aatools
|
||||
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
object AADate {
|
||||
// get UTC number from date
|
||||
fun AADateUTC(year: Int, month: Int, day: Int): Long {
|
||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||
sdf.timeZone = TimeZone.getTimeZone("UTC")
|
||||
var date: Date? = null
|
||||
try {
|
||||
date = sdf.parse("$year-$month-$day")
|
||||
} catch (e: ParseException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return date!!.time
|
||||
}
|
||||
}
|
||||
+325
@@ -0,0 +1,325 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aatools
|
||||
|
||||
|
||||
enum class AALinearGradientDirection {
|
||||
ToTop, //⇧⇧⇧⇧⇧⇧
|
||||
ToBottom, //⇩⇩⇩⇩⇩⇩
|
||||
ToLeft, //⇦⇦⇦⇦⇦⇦
|
||||
ToRight, //⇨⇨⇨⇨⇨⇨
|
||||
ToTopLeft, //⇖⇖⇖⇖⇖⇖
|
||||
ToTopRight, //⇗⇗⇗⇗⇗⇗
|
||||
ToBottomLeft, //⇙⇙⇙⇙⇙⇙
|
||||
ToBottomRight, //⇘⇘⇘⇘⇘⇘
|
||||
}
|
||||
|
||||
object AAGradientColor {
|
||||
val OceanBlue = oceanBlueColor()
|
||||
val Sanguine = sanguineColor()
|
||||
val LusciousLime = lusciousLimeColor()
|
||||
val PurpleLake = purpleLakeColor()
|
||||
val FreshPapaya = freshPapayaColor()
|
||||
val Ultramarine = ultramarineColor()
|
||||
val PinkSugar = pinkSugarColor()
|
||||
val LemonDrizzle = lemonDrizzleColor()
|
||||
val VictoriaPurple = victoriaPurpleColor()
|
||||
val SpringGreens = springGreensColor()
|
||||
val MysticMauve = mysticMauveColor()
|
||||
val ReflexSilver = reflexSilverColor()
|
||||
val NeonGlow = neonGlowColor()
|
||||
val BerrySmoothie = berrySmoothieColor()
|
||||
val NewLeaf = newLeafColor()
|
||||
val CottonCandy = cottonCandyColor()
|
||||
val PixieDust = pixieDustColor()
|
||||
val FizzyPeach = fizzyPeachColor()
|
||||
val SweetDream = sweetDreamColor()
|
||||
val Firebrick = firebrickColor()
|
||||
val WroughtIron = wroughtIronColor()
|
||||
val DeepSea = deepSeaColor()
|
||||
val CoastalBreeze = coastalBreezeColor()
|
||||
val EveningDelight = eveningDelightColor()
|
||||
|
||||
private fun oceanBlueColor(): Map<String, Any> {
|
||||
return oceanBlueColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun sanguineColor(): Map<String, Any> {
|
||||
return sanguineColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun lusciousLimeColor(): Map<String, Any> {
|
||||
return lusciousLimeColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun purpleLakeColor(): Map<String, Any> {
|
||||
return purpleLakeColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun freshPapayaColor(): Map<String, Any> {
|
||||
return freshPapayaColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun ultramarineColor(): Map<String, Any> {
|
||||
return ultramarineColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun pinkSugarColor(): Map<String, Any> {
|
||||
return pinkSugarColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun lemonDrizzleColor(): Map<String, Any> {
|
||||
return lemonDrizzleColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun victoriaPurpleColor(): Map<String, Any> {
|
||||
return victoriaPurpleColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun springGreensColor(): Map<String, Any> {
|
||||
return springGreensColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun mysticMauveColor(): Map<String, Any> {
|
||||
return mysticMauveColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun reflexSilverColor(): Map<String, Any> {
|
||||
return reflexSilverColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun neonGlowColor(): Map<String, Any> {
|
||||
return neonGlowColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun berrySmoothieColor(): Map<String, Any> {
|
||||
return berrySmoothieColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun newLeafColor(): Map<String, Any> {
|
||||
return newLeafColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun cottonCandyColor(): Map<String, Any> {
|
||||
return cottonCandyColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun pixieDustColor(): Map<String, Any> {
|
||||
return pixieDustColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun fizzyPeachColor(): Map<String, Any> {
|
||||
return fizzyPeachColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun sweetDreamColor(): Map<String, Any> {
|
||||
return sweetDreamColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun firebrickColor(): Map<String, Any> {
|
||||
return firebrickColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun wroughtIronColor(): Map<String, Any> {
|
||||
return wroughtIronColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun deepSeaColor(): Map<String, Any> {
|
||||
return deepSeaColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun coastalBreezeColor(): Map<String, Any> {
|
||||
return coastalBreezeColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
private fun eveningDelightColor(): Map<String, Any> {
|
||||
return eveningDelightColor(AALinearGradientDirection.ToTop)
|
||||
}
|
||||
|
||||
|
||||
fun oceanBlueColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#2E3192", "#1BFFFF")
|
||||
}
|
||||
|
||||
fun sanguineColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#D4145A", "#FBB03B")
|
||||
}
|
||||
|
||||
fun lusciousLimeColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#009245", "#FCEE21")
|
||||
}
|
||||
|
||||
fun purpleLakeColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#662D8C", "#ED1E79")
|
||||
}
|
||||
|
||||
fun freshPapayaColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#ED1C24", "#FCEE21")
|
||||
}
|
||||
|
||||
fun ultramarineColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#00A8C5", "#FFFF7E")
|
||||
}
|
||||
|
||||
fun pinkSugarColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#D74177", "#FFE98A")
|
||||
}
|
||||
|
||||
fun lemonDrizzleColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#FB872B", "#D9E021")
|
||||
}
|
||||
|
||||
fun victoriaPurpleColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#312A6C", "#852D91")
|
||||
}
|
||||
|
||||
fun springGreensColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#009E00", "#FFFF96")
|
||||
}
|
||||
|
||||
fun mysticMauveColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#B066FE", "#63E2FF")
|
||||
}
|
||||
|
||||
fun reflexSilverColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#808080", "#E6E6E6")
|
||||
}
|
||||
|
||||
fun neonGlowColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#00FFA1", "#00FFFF")
|
||||
}
|
||||
|
||||
fun berrySmoothieColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#8E78FF", "#FC7D7B")
|
||||
}
|
||||
|
||||
fun newLeafColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#00537E", "#3AA17E")
|
||||
}
|
||||
|
||||
fun cottonCandyColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#FCA5F1", "#B5FFFF")
|
||||
}
|
||||
|
||||
fun pixieDustColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#D585FF", "#00FFEE")
|
||||
}
|
||||
|
||||
fun fizzyPeachColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#F24645", "#EBC08D")
|
||||
}
|
||||
|
||||
fun sweetDreamColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#3A3897", "#A3A1FF")
|
||||
}
|
||||
|
||||
fun firebrickColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#45145A", "#FF5300")
|
||||
}
|
||||
|
||||
fun wroughtIronColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#333333", "#5A5454")
|
||||
}
|
||||
|
||||
fun deepSeaColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#4F00BC", "#29ABE2")
|
||||
}
|
||||
|
||||
fun coastalBreezeColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#00B7FF", "#FFFFC7")
|
||||
}
|
||||
|
||||
fun eveningDelightColor(direction: AALinearGradientDirection): Map<String, Any> {
|
||||
return linearGradient(direction, "#93278F", "#00A99D")
|
||||
}
|
||||
|
||||
fun linearGradient(
|
||||
startColor: String,
|
||||
endColor: String
|
||||
): Map<String, Any> {
|
||||
return linearGradient(
|
||||
AALinearGradientDirection.ToTop,
|
||||
startColor,
|
||||
endColor
|
||||
)
|
||||
}
|
||||
|
||||
fun linearGradient(
|
||||
direction: AALinearGradientDirection,
|
||||
startColor: String,
|
||||
endColor: String
|
||||
): Map<String, Any> {
|
||||
return linearGradient(direction, arrayOf<Any>(
|
||||
arrayOf(0, startColor),
|
||||
arrayOf(1, endColor)
|
||||
))
|
||||
}
|
||||
|
||||
fun linearGradient(
|
||||
direction: AALinearGradientDirection,
|
||||
stopsArr: Array<Any>
|
||||
): Map<String, Any> {
|
||||
return mapOf(
|
||||
"linearGradient" to linearGradientMap(direction),
|
||||
"stops" to stopsArr
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
(0,0) ----------- (1,0)
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
(0,1) ----------- (1,1)
|
||||
*/
|
||||
private fun linearGradientMap(
|
||||
direction: AALinearGradientDirection
|
||||
): Map<String, Int> {
|
||||
when (direction) {
|
||||
AALinearGradientDirection.ToTop ->
|
||||
return mapOf("x1" to 0, "y1" to 1, "x2" to 0, "y2" to 0)
|
||||
AALinearGradientDirection.ToBottom ->
|
||||
return mapOf("x1" to 0, "y1" to 0, "x2" to 0, "y2" to 1)
|
||||
AALinearGradientDirection.ToLeft ->
|
||||
return mapOf("x1" to 1, "y1" to 0, "x2" to 0, "y2" to 0)
|
||||
AALinearGradientDirection.ToRight ->
|
||||
return mapOf("x1" to 0, "y1" to 0, "x2" to 1, "y2" to 0)
|
||||
AALinearGradientDirection.ToTopLeft ->
|
||||
return mapOf("x1" to 1, "y1" to 1, "x2" to 0, "y2" to 0)
|
||||
AALinearGradientDirection.ToTopRight ->
|
||||
return mapOf("x1" to 0, "y1" to 1, "x2" to 1, "y2" to 0)
|
||||
AALinearGradientDirection.ToBottomLeft ->
|
||||
return mapOf("x1" to 1, "y1" to 0, "x2" to 0, "y2" to 1)
|
||||
AALinearGradientDirection.ToBottomRight ->
|
||||
return mapOf("x1" to 0, "y1" to 0, "x2" to 1, "y2" to 1)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.aatools
|
||||
|
||||
|
||||
object AAJSStringPurer {
|
||||
|
||||
fun pureJavaScriptFunctionString(JSStr: String): String {
|
||||
var pureJSStr = JSStr
|
||||
pureJSStr = pureJSStr.replace("'", "\"")
|
||||
pureJSStr = pureJSStr.replace("\u0000", "")
|
||||
pureJSStr = pureJSStr.replace("\n", "")
|
||||
pureJSStr = pureJSStr.replace("\\", "\\\\")
|
||||
pureJSStr = pureJSStr.replace("\"", "\\\"")
|
||||
pureJSStr = pureJSStr.replace("\'", "\\\'");
|
||||
pureJSStr = pureJSStr.replace("\n", "\\n")
|
||||
pureJSStr = pureJSStr.replace("\r", "\\r")
|
||||
// pureJSStr = pureJSStr.replace("\f", "\\f")
|
||||
pureJSStr = pureJSStr.replace("\u2028", "\\u2028")
|
||||
pureJSStr = pureJSStr.replace("\u2029", "\\u2029")
|
||||
|
||||
return pureJSStr
|
||||
}
|
||||
|
||||
//https://stackoverflow.com/questions/34334232/why-does-function-not-work-but-function-does-chrome-devtools-node
|
||||
fun pureAnonymousJSFunctionString(JSStr: String?): String? {
|
||||
var pureJSStr = "($JSStr)"
|
||||
pureJSStr = pureJavaScriptFunctionString(pureJSStr)
|
||||
return pureJSStr
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
Vendored
+172
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+84
@@ -0,0 +1,84 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,44 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.github.aachartmodel.aainfographics.demo"
|
||||
minSdkVersion 19
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':charts')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.20"
|
||||
implementation "androidx.appcompat:appcompat:1.6.1"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||
implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
|
||||
implementation "com.google.code.gson:gson:2.10.1"
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
-keep class com.github.aachartmodel.aainfographics.** { *; }
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.github.aachartmodel.aainfographics.demo">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:ignore="AllowBackup">
|
||||
<activity android:name=".basiccontent.MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".additionalcontent.ScrollingUpdateDataActivity" />
|
||||
<activity android:name=".basiccontent.SpecialChartActivity" />
|
||||
<activity android:name=".basiccontent.CustomStyleChartActivity" />
|
||||
<activity android:name=".basiccontent.MixedChartActivity" />
|
||||
<activity android:name=".basiccontent.BasicChartActivity" />
|
||||
<activity android:name=".additionalcontent.JSFormatterFunctionActivity" />
|
||||
<activity android:name=".additionalcontent.JSFunctionForAAAxisActivity" />
|
||||
<activity android:name=".additionalcontent.JSFunctionForAALegendActivity" />
|
||||
<activity android:name=".additionalcontent.JSFunctionForAAChartEventsActivity" />
|
||||
<activity android:name=".additionalcontent.JSFunctionForAAOptionsActivity" />
|
||||
<activity android:name=".additionalcontent.DrawChartWithAAOptionsActivity" />
|
||||
<activity android:name=".additionalcontent.EvaluateJSStringFunctionActivity" />
|
||||
<activity android:name=".additionalcontent.HideOrShowChartSeriesActivity" />
|
||||
<activity android:name=".additionalcontent.OnlyRefreshChartDataActivity" />
|
||||
<activity android:name=".additionalcontent.DoubleChartsLinkedWorkActivity" />
|
||||
<activity android:name=".additionalcontent.ScrollableChartActivity" />
|
||||
<activity android:name=".additionalcontent.AdvancedUpdatingFeatureActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.widget.CompoundButton
|
||||
import android.widget.RadioGroup
|
||||
import android.widget.Toast
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartStackingType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartSymbolType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.*
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.basiccontent.BasicChartActivity
|
||||
|
||||
class AdvancedUpdatingFeatureActivity : BasicChartActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
override fun onCheckedChanged(group: RadioGroup, checkedId: Int) {
|
||||
var options: Any? = Any()
|
||||
when (group.id) {
|
||||
R.id.stackingTypeRadioGroup -> {
|
||||
var stackingType = AAChartStackingType.False
|
||||
when (group.checkedRadioButtonId) {
|
||||
R.id.noStackingRadio -> stackingType = AAChartStackingType.False
|
||||
R.id.normalStackingRadio -> stackingType = AAChartStackingType.Normal
|
||||
R.id.percentStackingRadio -> stackingType = AAChartStackingType.Percent
|
||||
}
|
||||
val aaPlotOptions: AAPlotOptions = AAPlotOptions()
|
||||
.series(AASeries()
|
||||
.stacking(stackingType))
|
||||
options = aaPlotOptions
|
||||
}
|
||||
R.id.cornerStyleTypeRadioGroup -> {
|
||||
var borderRadius: Float? = null
|
||||
when (group.checkedRadioButtonId) {
|
||||
R.id.squareCornersRadio -> borderRadius = 1f
|
||||
R.id.roundedCornersRadio -> borderRadius = 10f
|
||||
R.id.wedgeCornersRadio -> borderRadius = 100f
|
||||
}
|
||||
val aaPlotOptions: AAPlotOptions
|
||||
aaPlotOptions = if (chartType == AAChartType.Column.value) {
|
||||
AAPlotOptions()
|
||||
.column(AAColumn()
|
||||
.borderRadius(borderRadius))
|
||||
} else {
|
||||
AAPlotOptions()
|
||||
.bar(AABar()
|
||||
.borderRadius(borderRadius))
|
||||
}
|
||||
options = aaPlotOptions
|
||||
}
|
||||
else -> {
|
||||
var markerSymbol = AAChartSymbolType.Circle
|
||||
when (group.checkedRadioButtonId) {
|
||||
R.id.circleSymbolRadio -> markerSymbol = AAChartSymbolType.Circle
|
||||
R.id.diamondSymbolRadio -> markerSymbol = AAChartSymbolType.Diamond
|
||||
R.id.squareSymbolRadio -> markerSymbol = AAChartSymbolType.Square
|
||||
R.id.triangleSymbolRadio -> markerSymbol = AAChartSymbolType.Triangle
|
||||
R.id.triangleDownSymbolRadio -> markerSymbol = AAChartSymbolType.TriangleDown
|
||||
}
|
||||
val aaPlotOptions: AAPlotOptions = AAPlotOptions()
|
||||
.series(AASeries()
|
||||
.marker(AAMarker()
|
||||
.symbol(markerSymbol.value)))
|
||||
options = aaPlotOptions
|
||||
}
|
||||
}
|
||||
aaChartView?.aa_updateChartWithOptions(options, true)
|
||||
}
|
||||
|
||||
override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
|
||||
var options = Any()
|
||||
when (buttonView.id) {
|
||||
R.id.xReversedSwitch -> {
|
||||
val aaXAxis: AAXAxis = AAXAxis()
|
||||
.reversed(isChecked)
|
||||
options = aaXAxis
|
||||
}
|
||||
R.id.yReversedSwitch -> {
|
||||
val aaYAxis: AAYAxis = AAYAxis()
|
||||
.reversed(isChecked)
|
||||
options = aaYAxis
|
||||
}
|
||||
R.id.xInvertedSwitch -> {
|
||||
if (this.aaChartModel.chartType == AAChartType.Bar) {
|
||||
Toast.makeText(
|
||||
this,
|
||||
"⚠️⚠️⚠️inverted is useless for Bar Chart",
|
||||
Toast.LENGTH_SHORT
|
||||
)
|
||||
.show()
|
||||
Log.d("", "⚠️⚠️⚠️inverted is useless for Bar Chart")
|
||||
}
|
||||
val aaChart: AAChart = AAChart()
|
||||
.inverted(isChecked)
|
||||
.polar(this.aaChartModel.polar)
|
||||
options = aaChart
|
||||
}
|
||||
R.id.polarSwitch -> {
|
||||
this.aaChartModel.polar = isChecked
|
||||
val aaChart: AAChart = AAChart()
|
||||
.polar(isChecked)
|
||||
.inverted(this.aaChartModel.inverted)
|
||||
options = aaChart
|
||||
if (this.aaChartModel.chartType == AAChartType.Column) {
|
||||
options = if (this.aaChartModel.polar == true) {
|
||||
AAOptions()
|
||||
.chart(aaChart)
|
||||
.plotOptions(AAPlotOptions()
|
||||
.column(AAColumn()
|
||||
.pointPadding(0f)
|
||||
.groupPadding(0.005f)))
|
||||
} else {
|
||||
AAOptions()
|
||||
.chart(aaChart)
|
||||
.plotOptions(AAPlotOptions()
|
||||
.column(AAColumn()
|
||||
.pointPadding(0.1f)
|
||||
.groupPadding(0.2f)))
|
||||
}
|
||||
} else if (this.aaChartModel.chartType == AAChartType.Bar) {
|
||||
options = if (this.aaChartModel.polar == true) {
|
||||
AAOptions()
|
||||
.chart(aaChart)
|
||||
.plotOptions(AAPlotOptions()
|
||||
.bar(AABar()
|
||||
.pointPadding(0f)
|
||||
.groupPadding(0.005f)))
|
||||
} else {
|
||||
AAOptions()
|
||||
.chart(aaChart)
|
||||
.plotOptions(AAPlotOptions()
|
||||
.bar(AABar()
|
||||
.pointPadding(0.1f)
|
||||
.groupPadding(0.2f)))
|
||||
}
|
||||
}
|
||||
}
|
||||
R.id.dataShowSwitch -> {
|
||||
val aaPlotOptions: AAPlotOptions = AAPlotOptions()
|
||||
.series(AASeries()
|
||||
.dataLabels(AADataLabels()
|
||||
.enabled(isChecked)))
|
||||
options = aaPlotOptions
|
||||
}
|
||||
R.id.markerHideSwitch -> {
|
||||
val aaMarker: AAMarker = if (isChecked)
|
||||
AAMarker()
|
||||
.enabled(false)
|
||||
else AAMarker()
|
||||
.enabled(true)
|
||||
.radius(6f)
|
||||
val aaPlotOptions: AAPlotOptions = AAPlotOptions()
|
||||
.series(AASeries()
|
||||
.marker(aaMarker))
|
||||
options = aaPlotOptions
|
||||
}
|
||||
}
|
||||
aaChartView?.aa_updateChartWithOptions(options, true)
|
||||
}
|
||||
}
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAColor
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAGradientColor
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
|
||||
class DoubleChartsLinkedWorkActivity : AppCompatActivity(),
|
||||
AAChartView.AAChartViewCallBack {
|
||||
private var selectedGradientColor: Any = AAColor.Red
|
||||
private var aaChartView1: AAChartView? = null
|
||||
private var aaChartView2: AAChartView? = null
|
||||
private var gradientColorsArr: Array<Any>? = null
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_double_charts_linked_work)
|
||||
aaChartView1 = findViewById(R.id.AAChartView1)
|
||||
aaChartView1?.callBack = this
|
||||
aaChartView2 = findViewById(R.id.AAChartView2)
|
||||
aaChartView1?.aa_drawChartWithChartOptions(configureChartOptions1())
|
||||
aaChartView2?.aa_drawChartWithChartOptions(configureChartOptions2())
|
||||
}
|
||||
|
||||
private fun configureChartOptions1(): AAOptions {
|
||||
val gradientColorNamesArr = arrayOf(
|
||||
"oceanBlue",
|
||||
"sanguine",
|
||||
"lusciousLime",
|
||||
"purpleLake",
|
||||
"freshPapaya",
|
||||
"ultramarine",
|
||||
"pinkSugar",
|
||||
"lemonDrizzle",
|
||||
"victoriaPurple",
|
||||
"springGreens",
|
||||
"mysticMauve",
|
||||
"reflexSilver",
|
||||
"neonGlowColor",
|
||||
"berrySmoothieColor",
|
||||
"newLeaf",
|
||||
"cottonCandy",
|
||||
"pixieDust",
|
||||
"fizzyPeach",
|
||||
"sweetDream",
|
||||
"firebrick",
|
||||
"wroughtIron",
|
||||
"deepSea",
|
||||
"coastalBreeze",
|
||||
"eveningDelight",
|
||||
"neonGlowColor",
|
||||
"berrySmoothieColor"
|
||||
)
|
||||
|
||||
val gradientColorArr = arrayOf(
|
||||
AAGradientColor.OceanBlue,
|
||||
AAGradientColor.Sanguine,
|
||||
AAGradientColor.LusciousLime,
|
||||
AAGradientColor.PurpleLake,
|
||||
AAGradientColor.FreshPapaya,
|
||||
AAGradientColor.Ultramarine,
|
||||
AAGradientColor.PinkSugar,
|
||||
AAGradientColor.LemonDrizzle,
|
||||
AAGradientColor.VictoriaPurple,
|
||||
AAGradientColor.SpringGreens,
|
||||
AAGradientColor.MysticMauve,
|
||||
AAGradientColor.ReflexSilver,
|
||||
AAGradientColor.NewLeaf,
|
||||
AAGradientColor.CottonCandy,
|
||||
AAGradientColor.PixieDust,
|
||||
AAGradientColor.FizzyPeach,
|
||||
AAGradientColor.SweetDream,
|
||||
AAGradientColor.Firebrick,
|
||||
AAGradientColor.WroughtIron,
|
||||
AAGradientColor.DeepSea,
|
||||
AAGradientColor.CoastalBreeze,
|
||||
AAGradientColor.EveningDelight,
|
||||
AAGradientColor.NeonGlow,
|
||||
AAGradientColor.BerrySmoothie
|
||||
)
|
||||
gradientColorsArr = gradientColorArr as Array<Any>
|
||||
val aaChartModel: AAChartModel = AAChartModel.Builder(this)
|
||||
.setChartType(AAChartType.Column)
|
||||
.setTitle("")
|
||||
.setYAxisTitle("")
|
||||
.setCategories(*gradientColorNamesArr)
|
||||
.setColorsTheme(gradientColorArr)
|
||||
.setXAxisReversed(true)
|
||||
.setYAxisReversed(true)
|
||||
.setInverted(true)
|
||||
.setLegendEnabled(false)
|
||||
.setTouchEventEnabled(true)
|
||||
.setSeries(AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.data(arrayOf(
|
||||
211, 183, 157, 133, 111, 91, 73, 57, 43, 31, 21, 13,
|
||||
211, 183, 157, 133, 111, 91, 73, 57, 43, 31, 21, 13
|
||||
))
|
||||
.colorByPoint(true)).build()
|
||||
val aaOptions: AAOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.plotOptions?.column?.groupPadding = 0f
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
private fun configureChartOptions2(): AAOptions {
|
||||
val aaChartModel: AAChartModel = AAChartModel.Builder(this)
|
||||
.setChartType(AAChartType.Column)
|
||||
.setTitle("")
|
||||
.setYAxisTitle("")
|
||||
.setLegendEnabled(false)
|
||||
.setYAxisGridLineWidth(0f)
|
||||
.setSeries(AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.data(arrayOf(
|
||||
211,183,157,133,111,91,73,57,43,31,21,13,
|
||||
211,183,157,133,111,91,73,57,43,31,21,13,
|
||||
))
|
||||
).build()
|
||||
val aaOptions: AAOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.plotOptions?.column?.groupPadding = 0f
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
private fun configureSeriesDataArray(): Array<AADataElement> {
|
||||
val maxRange = 40
|
||||
val numberArr1: Array<AADataElement?> = arrayOfNulls(maxRange)
|
||||
var y1: Double
|
||||
val max = 38
|
||||
val min = 1
|
||||
val random = (Math.random() * (max - min) + min).toInt()
|
||||
for (i in 0 until maxRange) {
|
||||
y1 = Math.sin(random * (i * Math.PI / 180)) + i * 2 * 0.01
|
||||
val aaDataElement: AADataElement = AADataElement()
|
||||
.color(selectedGradientColor)
|
||||
.y(y1.toFloat())
|
||||
numberArr1[i] = aaDataElement
|
||||
}
|
||||
return numberArr1 as Array<AADataElement>
|
||||
}
|
||||
|
||||
override fun chartViewDidFinishLoad(aaChartView: AAChartView) {
|
||||
|
||||
}
|
||||
|
||||
override fun chartViewMoveOverEventMessage(
|
||||
aaChartView: AAChartView,
|
||||
messageModel: AAMoveOverEventMessageModel
|
||||
) {
|
||||
selectedGradientColor = gradientColorsArr?.get(messageModel.index!!)!!
|
||||
|
||||
val mainHandler = Handler(Looper.getMainLooper())
|
||||
mainHandler.post {
|
||||
//已在主线程中,可以更新UI
|
||||
val aaSeriesElementsArr: Array<AASeriesElement> = arrayOf<AASeriesElement>(
|
||||
AASeriesElement()
|
||||
.data(configureSeriesDataArray() as Array<Any>)
|
||||
)
|
||||
aaChartView2?.aa_onlyRefreshTheChartDataWithChartOptionsSeriesArray(
|
||||
aaSeriesElementsArr
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureAAPlotBandsForChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureAAPlotLinesForChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureDoubleYAxesAndColumnLineMixedChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureDoubleYAxesMarketDepthChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureDoubleYAxisChartOptions
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureTheMirrorColumnChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureTripleYAxesMixedChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureXAxisLabelsFontColorAndFontSizeWithHTMLString
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureXAxisLabelsFontColorWithHTMLString
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configureXAxisPlotBand
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.configure_DataLabels_XAXis_YAxis_Legend_Style
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customAATooltipWithJSFunction
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customAreaChartTooltipStyleLikeHTMLTable
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customChartLegendStyle
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customLineChartDataLabelsFormat
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.customXAxisCrosshairStyle
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.doubleLayerHalfPieChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.gaugeChartWithPlotBand
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.ChartOptionsComposer.simpleGaugeChart
|
||||
|
||||
class DrawChartWithAAOptionsActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_draw_chart_with_aaoptions)
|
||||
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
|
||||
val aaOptions = configureTheChartOptions(chartType!!)
|
||||
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartOptions(aaOptions)
|
||||
|
||||
}
|
||||
|
||||
private fun configureTheChartOptions(chartType: String): AAOptions {
|
||||
when (chartType) {
|
||||
"customLegendStyle" -> return customChartLegendStyle()
|
||||
"AAPlotBandsForChart" -> return configureAAPlotBandsForChart()
|
||||
"AAPlotLinesForChart" -> return configureAAPlotLinesForChart()
|
||||
"customAATooltipWithJSFunction" -> return customAATooltipWithJSFunction()
|
||||
"customXAxisCrosshairStyle" -> return customXAxisCrosshairStyle()
|
||||
"XAxisLabelsFontColorWithHTMLString" -> return configureXAxisLabelsFontColorWithHTMLString()
|
||||
"XAxisLabelsFontColorAndFontSizeWithHTMLString" -> return configureXAxisLabelsFontColorAndFontSizeWithHTMLString()
|
||||
"_DataLabels_XAXis_YAxis_Legend_Style" -> return configure_DataLabels_XAXis_YAxis_Legend_Style()
|
||||
"XAxisPlotBand" -> return configureXAxisPlotBand()
|
||||
"configureTheMirrorColumnChart" -> return configureTheMirrorColumnChart()
|
||||
"configureDoubleYAxisChartOptions" -> return configureDoubleYAxisChartOptions()
|
||||
"configureTripleYAxesMixedChart" -> return configureTripleYAxesMixedChart()
|
||||
"customLineChartDataLabelsFormat" -> return customLineChartDataLabelsFormat()
|
||||
"configureDoubleYAxesAndColumnLineMixedChart" -> return configureDoubleYAxesAndColumnLineMixedChart()
|
||||
"configureDoubleYAxesMarketDepthChart" -> return configureDoubleYAxesMarketDepthChart()
|
||||
"customAreaChartTooltipStyleLikeHTMLTable" -> return customAreaChartTooltipStyleLikeHTMLTable()
|
||||
"simpleGaugeChart" -> return simpleGaugeChart()
|
||||
"gaugeChartWithPlotBand" -> return gaugeChartWithPlotBand()
|
||||
"doubleLayerHalfPieChart" -> return doubleLayerHalfPieChart()
|
||||
}
|
||||
return configureAAPlotBandsForChart()
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
|
||||
|
||||
class EvaluateJSStringFunctionActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_evaluate_jsstring_function)
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
|
||||
|
||||
class HideOrShowChartSeriesActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_hide_or_show_chart_series)
|
||||
}
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customAreaChartTooltipStyleWithColorfulHtmlLabels
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customAreaChartTooltipStyleWithDifferentUnitSuffix
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customAreaChartTooltipStyleWithSimpleFormatString
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customArearangeChartTooltip
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customBoxplotTooltipContent
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customDoubleXAxesChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customLineChartOriginalPointPositionByConfiguringXAxisFormatterAndTooltipFormatter
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customLineChartTooltipStyleWhenValueBeZeroDoNotShow
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customStackedAndGroupedColumnChartTooltip
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customTooltipWhichDataSourceComeFromOutSideRatherThanSeries
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customYAxisLabels
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAATooltipComposer.customYAxisLabels2
|
||||
|
||||
class JSFormatterFunctionActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
|
||||
val aaOptions = configureTheChartOptions(chartType!!)
|
||||
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartOptions(aaOptions)
|
||||
|
||||
}
|
||||
|
||||
private fun configureTheChartOptions(chartType: String): AAOptions {
|
||||
when (chartType) {
|
||||
"customAreaChartTooltipStyleWithSimpleFormatString" -> return customAreaChartTooltipStyleWithSimpleFormatString()//简单字符串拼接
|
||||
"customAreaChartTooltipStyleWithDifferentUnitSuffix" -> return customAreaChartTooltipStyleWithDifferentUnitSuffix()//自定义不同单位后缀
|
||||
"customAreaChartTooltipStyleWithColorfulHtmlLabels" -> return customAreaChartTooltipStyleWithColorfulHtmlLabels()//自定义多彩颜色文字
|
||||
"customLineChartTooltipStyleWhenValueBeZeroDoNotShow" -> return customLineChartTooltipStyleWhenValueBeZeroDoNotShow()//值为0时,在tooltip中不显示
|
||||
"customBoxplotTooltipContent" -> return customBoxplotTooltipContent()
|
||||
"customYAxisLabels" -> return customYAxisLabels()
|
||||
"customYAxisLabels2" -> return customYAxisLabels2()
|
||||
"customStackedAndGroupedColumnChartTooltip" -> return customStackedAndGroupedColumnChartTooltip()
|
||||
"customDoubleXAxesChart" -> return customDoubleXAxesChart()
|
||||
"customArearangeChartTooltip" -> return customArearangeChartTooltip()
|
||||
"customLineChartOriginalPointPositionByConfiguringXAxisFormatterAndTooltipFormatter" ->
|
||||
return customLineChartOriginalPointPositionByConfiguringXAxisFormatterAndTooltipFormatter()
|
||||
"customTooltipWhichDataSourceComeFromOutSideRatherThanSeries" ->
|
||||
return customTooltipWhichDataSourceComeFromOutSideRatherThanSeries()
|
||||
|
||||
}
|
||||
return customAreaChartTooltipStyleWithSimpleFormatString()
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customYAxisLabels
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customYAxisLabels2
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customAreaChartXAxisLabelsTextUnitSuffix1
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customAreaChartXAxisLabelsTextUnitSuffix2
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.configureTheAxesLabelsFormattersOfDoubleYAxesChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.configureTheAxesLabelsFormattersOfDoubleYAxesChart2
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.configureTheAxesLabelsFormattersOfDoubleYAxesChart3
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customSpiderChartStyle
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customizeEveryDataLabelSinglelyByDataLabelsFormatter
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAAxisComposer.customXAxisLabelsBeImages
|
||||
|
||||
|
||||
class JSFunctionForAAAxisActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
val aaOptions: AAOptions = chartConfigurationWithSelectedIndex(chartType)
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartOptions(aaOptions)
|
||||
}
|
||||
|
||||
fun chartConfigurationWithSelectedIndex(chartType: String?): AAOptions {
|
||||
return when (chartType) {
|
||||
"customYAxisLabels" -> customYAxisLabels() //自定义Y轴文字
|
||||
"customYAxisLabels2" -> customYAxisLabels2() //自定义Y轴文字2
|
||||
"customAreaChartXAxisLabelsTextUnitSuffix1" -> customAreaChartXAxisLabelsTextUnitSuffix1() //自定义X轴文字单位后缀(通过 formatter 函数)
|
||||
"customAreaChartXAxisLabelsTextUnitSuffix2" -> customAreaChartXAxisLabelsTextUnitSuffix2() //自定义X轴文字单位后缀(不通过 formatter 函数)
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart" -> configureTheAxesLabelsFormattersOfDoubleYAxesChart() //配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 1
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart2" -> configureTheAxesLabelsFormattersOfDoubleYAxesChart2() //配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 2
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart3" -> configureTheAxesLabelsFormattersOfDoubleYAxesChart3() //配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 3
|
||||
"customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters" -> customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters() //通过截取前四个字符来自定义 X 轴 labels
|
||||
"customSpiderChartStyle" -> customSpiderChartStyle() //自定义蜘蛛🕷🕸图样式
|
||||
"customizeEveryDataLabelSinglelyByDataLabelsFormatter" -> customizeEveryDataLabelSinglelyByDataLabelsFormatter() //通过 DataLabels 的 formatter 函数来实现单个数据标签🏷自定义
|
||||
"customXAxisLabelsBeImages" -> customXAxisLabelsBeImages() //自定义 X轴 labels 为一组图片
|
||||
else -> customYAxisLabels()
|
||||
}
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.advancedTimeLineChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.automaticallyHideTooltipAfterItIsShown
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.configureBlinkMarkerChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.configureECGStyleChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.configureScatterChartWithBlinkEffect
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.configureSpecialStyleMarkerOfSingleDataElementChartWithBlinkEffect
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.customizeYAxisPlotLinesLabelBeSpecialStyle
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.dynamicHeightGridLineAreaChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAChartEventsComposer.generalDrawingChart
|
||||
|
||||
class JSFunctionForAAChartEventsActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
|
||||
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
|
||||
val aaOptions = configureTheChartOptions(chartType!!)
|
||||
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartOptions(aaOptions) }
|
||||
|
||||
fun configureTheChartOptions(chartType: String?): AAOptions {
|
||||
when (chartType) {
|
||||
"setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart" -> return setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart() //图表加载完成后,自动设置默认的十字准星和浮动提示框的位置
|
||||
"generalDrawingChart" -> return generalDrawingChart() //自由绘图
|
||||
"advancedTimeLineChart" -> return advancedTimeLineChart() //高级时间线图
|
||||
"configureBlinkMarkerChart" -> return configureBlinkMarkerChart() //配置闪烁的标记点
|
||||
"configureSpecialStyleMarkerOfSingleDataElementChartWithBlinkEffect" -> return configureSpecialStyleMarkerOfSingleDataElementChartWithBlinkEffect() //配置单个数据元素的特殊样式标记点即闪烁特效
|
||||
"configureScatterChartWithBlinkEffect" -> return configureScatterChartWithBlinkEffect() //配置散点图的闪烁特效
|
||||
"automaticallyHideTooltipAfterItIsShown" -> return automaticallyHideTooltipAfterItIsShown() //图表加载完成后,自动隐藏浮动提示框
|
||||
"dynamicHeightGridLineAreaChart" -> return dynamicHeightGridLineAreaChart() //动态高度网格线的区域填充图
|
||||
"customizeYAxisPlotLinesLabelBeSpecialStyle" -> return customizeYAxisPlotLinesLabelBeSpecialStyle() //自定义 Y 轴轴线上面的标签文字特殊样式
|
||||
"configureECGStyleChart" -> return configureECGStyleChart() //配置 ECG 样式的图表
|
||||
}
|
||||
return setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart()
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAALegendComposer.customLegendItemClickEvent
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAALegendComposer.disableLegendClickEventForNormalChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAALegendComposer.disableLegendClickEventForPieChart
|
||||
|
||||
class JSFunctionForAALegendActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
val aaOptions: AAOptions = chartConfigurationWithSelectedIndex(chartType)
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartOptions(aaOptions)
|
||||
}
|
||||
|
||||
fun chartConfigurationWithSelectedIndex(chartType: String?): AAOptions {
|
||||
return when (chartType) {
|
||||
"disableLegendClickEventForNormalChart" -> disableLegendClickEventForNormalChart() //禁用普通图表的图例点击事件
|
||||
"disableLegendClickEventForPieChart" -> disableLegendClickEventForPieChart() //禁用饼图图表的图例点击事件
|
||||
"customLegendItemClickEvent" -> customLegendItemClickEvent() //自定义图例点击事件
|
||||
else -> disableLegendClickEventForNormalChart()
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAOptionsComposer.configureColorfulDataLabelsForPieChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAOptionsComposer.customDoubleXAxesChart
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAOptionsComposer.customizeEveryDataLabelSinglelyByDataLabelsFormatter
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.JSFunctionForAAOptionsComposer.disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction
|
||||
|
||||
class JSFunctionForAAOptionsActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_custom_tooltip_with_jsfunction)
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
val aaOptions: AAOptions = chartConfigurationWithSelectedIndex(chartType)
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartOptions(aaOptions)
|
||||
}
|
||||
|
||||
fun chartConfigurationWithSelectedIndex(chartType: String?): AAOptions {
|
||||
return when (chartType) {
|
||||
"customDoubleXAxesChart" -> customDoubleXAxesChart() //自定义双 X 轴图表
|
||||
"disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction" -> disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction() //禁用柱状图图表的选中状态
|
||||
"customizeEveryDataLabelSinglelyByDataLabelsFormatter" -> customizeEveryDataLabelSinglelyByDataLabelsFormatter() //自定义每个数据点的数据标签内容
|
||||
"configureColorfulDataLabelsForPieChart" -> configureColorfulDataLabelsForPieChart() //为饼图图表配置多彩的数据标签
|
||||
else -> customDoubleXAxesChart()
|
||||
}
|
||||
}
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAOptions
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAGradientColor
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.sin
|
||||
|
||||
class OnlyRefreshChartDataActivity : AppCompatActivity() {
|
||||
private var aaChartModel = AAChartModel()
|
||||
private var aaChartView: AAChartView? = null
|
||||
private var updateTimes: Int = 0
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_only_refresh_chart_data)
|
||||
|
||||
setUpAAChartView()
|
||||
repeatUpdateChartData()
|
||||
}
|
||||
|
||||
|
||||
fun setUpAAChartView() {
|
||||
aaChartView = findViewById(R.id.AAChartView)
|
||||
aaChartModel = configureAAChartModel()
|
||||
val aaOptions: AAOptions = aaChartModel.aa_toAAOptions()
|
||||
if (aaChartModel.chartType == AAChartType.Column) {
|
||||
aaOptions.plotOptions?.column!!
|
||||
.groupPadding(0f)
|
||||
.pointPadding(0f)
|
||||
.borderRadius(5f)
|
||||
} else if (aaChartModel.chartType == AAChartType.Bar) {
|
||||
aaOptions.plotOptions?.bar!!
|
||||
.groupPadding(0f)
|
||||
.pointPadding(0f)
|
||||
.borderRadius(5f)
|
||||
}
|
||||
aaChartView?.aa_drawChartWithChartOptions(aaOptions)
|
||||
}
|
||||
|
||||
private fun configureAAChartModel(): AAChartModel {
|
||||
val aaChartModel = configureChartBasicContent()
|
||||
aaChartModel.series(this.configureChartSeriesArray() as Array<Any>)
|
||||
return aaChartModel
|
||||
}
|
||||
|
||||
private fun configureChartBasicContent(): AAChartModel {
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
return AAChartModel.Builder(this)
|
||||
.setChartType(convertStringToEnum(chartType!!))
|
||||
.setXAxisVisible(true)
|
||||
.setYAxisVisible(false)
|
||||
.setTitle("")
|
||||
.setYAxisTitle("摄氏度")
|
||||
.setColorsTheme(arrayOf(
|
||||
AAGradientColor.Sanguine,
|
||||
AAGradientColor.DeepSea,
|
||||
AAGradientColor.NeonGlow,
|
||||
AAGradientColor.WroughtIron
|
||||
))
|
||||
.setStacking(AAChartStackingType.Normal)
|
||||
.build()
|
||||
}
|
||||
|
||||
private fun convertStringToEnum(chartTypeStr: String): AAChartType {
|
||||
var chartTypeEnum = AAChartType.Column
|
||||
when (chartTypeStr) {
|
||||
AAChartType.Column.value -> chartTypeEnum = AAChartType.Column
|
||||
AAChartType.Bar.value -> chartTypeEnum = AAChartType.Bar
|
||||
AAChartType.Area.value -> chartTypeEnum = AAChartType.Area
|
||||
AAChartType.Areaspline.value -> chartTypeEnum = AAChartType.Areaspline
|
||||
AAChartType.Line.value -> chartTypeEnum = AAChartType.Line
|
||||
AAChartType.Spline.value -> chartTypeEnum = AAChartType.Spline
|
||||
AAChartType.Scatter.value -> chartTypeEnum = AAChartType.Scatter
|
||||
}
|
||||
return chartTypeEnum
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
private fun configureChartSeriesArray(): Array<AASeriesElement> {
|
||||
val maxRange = 40
|
||||
val numberArr1 = arrayOfNulls<Any>(maxRange)
|
||||
val numberArr2 = arrayOfNulls<Any>(maxRange)
|
||||
var y1: Double
|
||||
var y2: Double
|
||||
val max = 38
|
||||
val min = 1
|
||||
val random = (Math.random() * (max - min) + min).toInt()
|
||||
for (i in 0 until maxRange) {
|
||||
y1 = sin(random * (i * Math.PI / 180)) + i * 2 * 0.01
|
||||
y2 = cos(random * (i * Math.PI / 180)) + i * 3 * 0.01
|
||||
numberArr1[i] = y1
|
||||
numberArr2[i] = y2
|
||||
}
|
||||
return arrayOf(
|
||||
AASeriesElement()
|
||||
.name("2017")
|
||||
.data(numberArr1 as Array<Any>),
|
||||
AASeriesElement()
|
||||
.name("2018")
|
||||
.data(numberArr2 as Array<Any>),
|
||||
AASeriesElement()
|
||||
.name("2019")
|
||||
.data(numberArr1 as Array<Any>),
|
||||
AASeriesElement()
|
||||
.name("2020")
|
||||
.data(numberArr2 as Array<Any>)
|
||||
)
|
||||
}
|
||||
|
||||
private fun repeatUpdateChartData() {
|
||||
val mStartVideoHandler = Handler()
|
||||
|
||||
val mStartVideoRunnable: Runnable = object : Runnable {
|
||||
|
||||
override fun run() {
|
||||
val seriesArr = configureChartSeriesArray()
|
||||
aaChartView!!.aa_onlyRefreshTheChartDataWithChartOptionsSeriesArray(seriesArr)
|
||||
|
||||
mStartVideoHandler.postDelayed(this, 1000)
|
||||
updateTimes += 1
|
||||
|
||||
print("图表数据正在刷新,刷新次数为:$updateTimes")
|
||||
}
|
||||
}
|
||||
|
||||
mStartVideoHandler.postDelayed(mStartVideoRunnable, 2000)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+259
@@ -0,0 +1,259 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.*
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAJSStringPurer
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import kotlin.math.sin
|
||||
|
||||
|
||||
class ScrollableChartActivity : AppCompatActivity() {
|
||||
private var aaChartView1: AAChartView? = null
|
||||
private var aaChartModel: AAChartModel? = null
|
||||
private var aaOptions: AAOptions? = null
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_scollable_chart)
|
||||
aaChartView1 = findViewById(R.id.AAChartView1)
|
||||
val aaChartModel: AAChartModel = configureChartModel()
|
||||
if (aaOptions == null) {
|
||||
aaOptions = aaChartModel.aa_toAAOptions()
|
||||
}
|
||||
aaChartView1?.aa_drawChartWithChartOptions(aaOptions!!)
|
||||
}
|
||||
|
||||
private fun configureChartModel(): AAChartModel {
|
||||
val chartType = intent.getStringExtra("chartType").toString()
|
||||
val position = intent.getIntExtra("position", 0)
|
||||
val chartTypeEnum = convertStringToEnum(chartType)
|
||||
|
||||
val seriesDataArray = configureSeriesDataArray() as Array<Any>
|
||||
|
||||
val aaChartModel = AAChartModel.Builder(this)
|
||||
.setChartType(chartTypeEnum)
|
||||
.setTitle("")
|
||||
.setYAxisTitle("")
|
||||
.setLegendEnabled(false)
|
||||
.setYAxisGridLineWidth(0f)
|
||||
.setScrollablePlotArea(
|
||||
AAScrollablePlotArea()
|
||||
.minWidth(3000)
|
||||
.scrollPositionX(1f))
|
||||
.setSeries(
|
||||
AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.data(seriesDataArray)
|
||||
)
|
||||
.build()
|
||||
|
||||
this.aaChartModel = aaChartModel
|
||||
configureTheStyleForDifferentTypeChart(chartTypeEnum, position)
|
||||
return aaChartModel
|
||||
}
|
||||
|
||||
private fun convertStringToEnum(chartTypeStr: String): AAChartType {
|
||||
var chartTypeEnum = AAChartType.Column
|
||||
when (chartTypeStr) {
|
||||
AAChartType.Column.value -> chartTypeEnum = AAChartType.Column
|
||||
AAChartType.Bar.value -> chartTypeEnum = AAChartType.Bar
|
||||
AAChartType.Area.value -> chartTypeEnum = AAChartType.Area
|
||||
AAChartType.Areaspline.value -> chartTypeEnum = AAChartType.Areaspline
|
||||
AAChartType.Line.value -> chartTypeEnum = AAChartType.Line
|
||||
AAChartType.Spline.value -> chartTypeEnum = AAChartType.Spline
|
||||
}
|
||||
return chartTypeEnum
|
||||
}
|
||||
|
||||
fun configureTheStyleForDifferentTypeChart(
|
||||
chartType: AAChartType,
|
||||
position: Int
|
||||
) {
|
||||
if ((chartType == AAChartType.Area || chartType == AAChartType.Line)
|
||||
&& (position == 4 || position == 5)
|
||||
) {
|
||||
configureStepAreaChartAndStepLineChart()
|
||||
} else if (chartType == AAChartType.Column || chartType == AAChartType.Bar) {
|
||||
configureColumnChartAndBarChartStyle()
|
||||
} else if (chartType == AAChartType.Area || chartType == AAChartType.Areaspline) {
|
||||
configureAreaChartAndAreasplineChartStyle(chartType)
|
||||
} else if (chartType == AAChartType.Line || chartType == AAChartType.Spline) {
|
||||
configureLineChartAndSplineChartStyle(chartType)
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureStepAreaChartAndStepLineChart() {
|
||||
val element1 = AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.step(true)
|
||||
.data(arrayOf(149.9, 171.5, 106.4, 129.2, 144.0, 176.0, 135.6, 188.5, 276.4, 214.1, 95.6, 54.4))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("NewYork")
|
||||
.step(true)
|
||||
.data(arrayOf(83.6, 78.8, 188.5, 93.4, 106.0, 84.5, 105.0, 104.3, 131.2, 153.5, 226.6, 192.3))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("London")
|
||||
.step(true)
|
||||
.data(arrayOf(48.9, 38.8, 19.3, 41.4, 47.0, 28.3, 59.0, 69.6, 52.4, 65.2, 53.3, 72.2))
|
||||
|
||||
aaChartModel?.series(arrayOf(element1, element2, element3))
|
||||
}
|
||||
|
||||
private fun configureColumnChartAndBarChartStyle() {
|
||||
if (aaChartModel?.chartType == AAChartType.Bar) {
|
||||
val pureJSStr: String = AAJSStringPurer.pureJavaScriptFunctionString(
|
||||
"Source: <a href=\"https://highcharts.uservoice.com/forums/55896-highcharts-javascript-api\">UserVoice</a>"
|
||||
)
|
||||
val element: AASeriesElement = AASeriesElement()
|
||||
.data(arrayOf(
|
||||
arrayOf("Gantt chart", 1000),
|
||||
arrayOf("Autocalculation and plotting of trend lines", 575),
|
||||
arrayOf("Allow navigator to have multiple data series", 523),
|
||||
arrayOf("Implement dynamic font size", 427),
|
||||
arrayOf("Multiple axis alignment control", 399),
|
||||
arrayOf("Stacked area (spline etc) in irregular datetime series", 309),
|
||||
arrayOf("Adapt chart height to legend height", 278),
|
||||
arrayOf("Export charts in excel sheet", 239),
|
||||
arrayOf("Toggle legend box", 235),
|
||||
arrayOf("Venn Diagram", 203),
|
||||
arrayOf("Add ability to change Rangeselector position", 182),
|
||||
arrayOf("Draggable legend box", 157),
|
||||
arrayOf("Sankey Diagram", 149),
|
||||
arrayOf("Add Navigation bar for Y-Axis in Highstock", 144),
|
||||
arrayOf("Grouped x-axis", 143),
|
||||
arrayOf("ReactJS plugin", 137),
|
||||
arrayOf("3D surface charts", 134),
|
||||
arrayOf("Draw lines over a stock chart, for analysis purpose", 118),
|
||||
arrayOf("Data module for database tables", 118),
|
||||
arrayOf("Draggable points", 117)
|
||||
))
|
||||
|
||||
val aaOptions: AAOptions = AAOptions()
|
||||
.chart(AAChart()
|
||||
.type(AAChartType.Bar)
|
||||
.scrollablePlotArea(
|
||||
AAScrollablePlotArea()
|
||||
.minHeight(900)
|
||||
))
|
||||
.title(AATitle()
|
||||
.text("Most popular ideas by April 2016"))
|
||||
.subtitle(AASubtitle()
|
||||
.text(pureJSStr))
|
||||
.xAxis(AAXAxis()
|
||||
.type(AAChartAxisType.Category))
|
||||
.series(arrayOf(element))
|
||||
this.aaOptions = aaOptions
|
||||
} else {
|
||||
aaChartModel!!
|
||||
.categories(arrayOf(
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
))
|
||||
.legendEnabled(true)
|
||||
.colorsTheme(arrayOf("#fe117c", "#ffc069", "#06caf4", "#7dffc0"))
|
||||
.animationType(AAChartAnimationType.EaseOutCubic)
|
||||
.animationDuration(1200)
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureAreaChartAndAreasplineChartStyle(chartType: AAChartType) {
|
||||
aaChartModel!!
|
||||
.animationType(AAChartAnimationType.EaseOutQuart)
|
||||
.legendEnabled(true)
|
||||
.markerRadius(5f)
|
||||
.markerSymbol(AAChartSymbolType.Circle)
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
|
||||
if (chartType == AAChartType.Areaspline) {
|
||||
val element1 = AASeriesElement()
|
||||
.name("Predefined symbol")
|
||||
.data(arrayOf(0.45, 0.43, 0.50, 0.55, 0.58, 0.62, 0.83, 0.39, 0.56, 0.67, 0.50, 0.34, 0.50, 0.67, 0.58, 0.29, 0.46, 0.23, 0.47, 0.46, 0.38, 0.56, 0.48, 0.36))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("Image symbol")
|
||||
.data(arrayOf(0.38, 0.31, 0.32, 0.32, 0.64, 0.66, 0.86, 0.47, 0.52, 0.75, 0.52, 0.56, 0.54, 0.60, 0.46, 0.63, 0.54, 0.51, 0.58, 0.64, 0.60, 0.45, 0.36, 0.67))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("Base64 symbol (*)")
|
||||
.data(arrayOf(0.46, 0.32, 0.53, 0.58, 0.86, 0.68, 0.85, 0.73, 0.69, 0.71, 0.91, 0.74, 0.60, 0.50, 0.39, 0.67, 0.55, 0.49, 0.65, 0.45, 0.64, 0.47, 0.63, 0.64))
|
||||
|
||||
val element4 = AASeriesElement()
|
||||
.name("Custom symbol")
|
||||
.data(arrayOf(0.60, 0.51, 0.52, 0.53, 0.64, 0.84, 0.65, 0.68, 0.63, 0.47, 0.72, 0.60, 0.65, 0.74, 0.66, 0.65, 0.71, 0.59, 0.65, 0.77, 0.52, 0.53, 0.58, 0.53))
|
||||
|
||||
aaChartModel!!
|
||||
.animationType(AAChartAnimationType.EaseFrom) //设置图表渲染动画类型为 EaseFrom
|
||||
.series(arrayOf(element1, element2, element3, element4))
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureLineChartAndSplineChartStyle(chartType: AAChartType) {
|
||||
aaChartModel!!
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.BorderBlank) //设置折线连接点样式为:边缘白色
|
||||
.markerRadius(6f)
|
||||
if (chartType == AAChartType.Line) {
|
||||
val element1 = AASeriesElement()
|
||||
.name("Hestavollane")
|
||||
.data(arrayOf(
|
||||
0.2, 0.8, 0.8, 0.8, 1, 1.3, 1.5, 2.9, 1.9, 2.6, 1.6, 3, 4, 3.6,
|
||||
5.5, 6.2, 5.5, 4.5, 4, 3.1, 2.7, 4, 2.7, 2.3, 2.3, 4.1, 7.7, 7.1,
|
||||
5.6, 6.1, 5.8, 8.6, 7.2, 9, 10.9, 11.5, 11.6, 11.1, 12, 12.3, 10.7,
|
||||
9.4, 9.8, 9.6, 9.8, 9.5, 8.5, 7.4, 7.6
|
||||
))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("Vik")
|
||||
.data(arrayOf(
|
||||
0, 0, 0.6, 0.9, 0.8, 0.2, 0, 0, 0, 0.1, 0.6, 0.7, 0.8, 0.6, 0.2,
|
||||
0, 0.1, 0.3, 0.3, 0, 0.1, 0, 0, 0, 0.2, 0.1, 0, 0.3, 0, 0.1, 0.2,
|
||||
0.1, 0.3, 0.3, 0, 3.1, 3.1, 2.5, 1.5, 1.9, 2.1, 1, 2.3, 1.9, 1.2,
|
||||
0.7, 1.3, 0.4, 0.3
|
||||
))
|
||||
|
||||
aaChartModel!!
|
||||
.series(arrayOf(element1, element2))
|
||||
} else if (chartType == AAChartType.Spline) {
|
||||
val element1 = AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.lineWidth(7f)
|
||||
.data(arrayOf(50, 320, 230, 370, 230, 400))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("Berlin")
|
||||
.lineWidth(7f)
|
||||
.data(arrayOf(80, 390, 210, 340, 240, 350))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("New York")
|
||||
.lineWidth(7f)
|
||||
.data(arrayOf(100, 370, 180, 280, 260, 300))
|
||||
|
||||
val element4 = AASeriesElement()
|
||||
.name("London")
|
||||
.lineWidth(7f)
|
||||
.data(arrayOf(130, 350, 160, 310, 250, 268))
|
||||
|
||||
aaChartModel!!
|
||||
.animationType(AAChartAnimationType.SwingFromTo)
|
||||
.series(arrayOf(element1, element2, element3, element4))
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureSeriesDataArray(): Array<AADataElement?> {
|
||||
val maxRange = 388
|
||||
val numberArr1 = arrayOfNulls<AADataElement>(maxRange)
|
||||
var y1: Double
|
||||
val max = 38
|
||||
val min = 1
|
||||
val random = (Math.random() * (max - min) + min).toInt()
|
||||
for (i in 0 until maxRange) {
|
||||
y1 = sin(random * (i * Math.PI / 180)) + i * 2 * 0.01
|
||||
val aaDataElement: AADataElement = AADataElement()
|
||||
.y(y1.toFloat())
|
||||
numberArr1[i] = aaDataElement
|
||||
}
|
||||
return numberArr1
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.additionalcontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
|
||||
|
||||
class ScrollingUpdateDataActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_scrolling_update_data)
|
||||
}
|
||||
}
|
||||
+313
@@ -0,0 +1,313 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.basiccontent
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.CompoundButton
|
||||
import android.widget.RadioGroup
|
||||
import android.widget.Switch
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAGradientColor
|
||||
import com.github.aachartmodel.aainfographics.aatools.AALinearGradientDirection
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.BasicChartComposer
|
||||
import com.google.gson.Gson
|
||||
|
||||
open class BasicChartActivity : AppCompatActivity(), RadioGroup.OnCheckedChangeListener,
|
||||
CompoundButton.OnCheckedChangeListener, AAChartView.AAChartViewCallBack {
|
||||
|
||||
var aaChartModel = AAChartModel()
|
||||
var aaChartView: AAChartView? = null
|
||||
var chartType: String = ""
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_basic_chart)
|
||||
|
||||
setUpAAChartView()
|
||||
setUpRadioButtonsAndSwitches()
|
||||
}
|
||||
|
||||
private fun setUpAAChartView() {
|
||||
aaChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView?.setBackgroundColor(0)
|
||||
aaChartView?.callBack = this
|
||||
aaChartModel = configureAAChartModel()
|
||||
aaChartView?.aa_drawChartWithChartModel(aaChartModel)
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun configureAAChartModel(): AAChartModel {
|
||||
val intent = intent
|
||||
chartType = intent.getStringExtra("chartType").toString()
|
||||
val position = intent.getIntExtra("position", 0)
|
||||
aaChartModel = BasicChartComposer.configureAreaChart()
|
||||
val chartTypeEnum = convertStringToEnum(chartType)
|
||||
aaChartModel.chartType(chartTypeEnum)
|
||||
|
||||
configureTheStyleForDifferentTypeChart(chartType,position)
|
||||
configureViewsVisibility(chartType)
|
||||
|
||||
return aaChartModel
|
||||
}
|
||||
|
||||
private fun configureTheStyleForDifferentTypeChart(chartType: String, position: Int) {
|
||||
if ((chartType == AAChartType.Area.value || chartType == AAChartType.Line.value)
|
||||
&& (position == 4 || position == 5)) {
|
||||
configureStepAreaChartAndStepLineChartStyle()
|
||||
} else if (chartType == AAChartType.Column.value || chartType == AAChartType.Bar.value) {
|
||||
configureColumnChartAndBarChartStyle()
|
||||
} else if (chartType == AAChartType.Area.value || chartType == AAChartType.Areaspline.value) {
|
||||
configureAreaChartAndAreasplineChartStyle(chartType)
|
||||
} else if (chartType == AAChartType.Line.value || chartType == AAChartType.Spline.value) {
|
||||
configureLineChartAndSplineChartStyle(chartType)
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureViewsVisibility(chartType: String) {
|
||||
val squareCornersRadio: RadioGroup = findViewById(R.id.cornerStyleTypeRadioGroup)
|
||||
val markerSymbolTypeRadioGroup: RadioGroup = findViewById(R.id.markerSymbolTypeRadioGroup)
|
||||
if (chartType == AAChartType.Column.value || chartType == AAChartType.Bar.value) {
|
||||
squareCornersRadio.visibility = View.VISIBLE
|
||||
markerSymbolTypeRadioGroup.visibility = View.GONE
|
||||
|
||||
val markerHideSwitch: Switch = findViewById(R.id.markerHideSwitch)
|
||||
markerHideSwitch.visibility = View.GONE
|
||||
val markerHideTextView: TextView = findViewById(R.id.markerHideTextView)
|
||||
markerHideTextView.visibility = View.GONE
|
||||
} else {
|
||||
squareCornersRadio.visibility = View.GONE
|
||||
markerSymbolTypeRadioGroup.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureStepAreaChartAndStepLineChartStyle() {
|
||||
val element1 = AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.step(true)
|
||||
.data(arrayOf(149.9, 171.5, 106.4, 129.2, 144.0, 176.0, 135.6, 188.5, 276.4, 214.1, 95.6, 54.4))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("NewYork")
|
||||
.step(true)
|
||||
.data(arrayOf(83.6, 78.8, 188.5, 93.4, 106.0, 84.5, 105.0, 104.3, 131.2, 153.5, 226.6, 192.3))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("London")
|
||||
.step(true)
|
||||
.data(arrayOf(48.9, 38.8, 19.3, 41.4, 47.0, 28.3, 59.0, 69.6, 52.4, 65.2, 53.3, 72.2))
|
||||
|
||||
aaChartModel.series(arrayOf(element1, element2, element3))
|
||||
}
|
||||
|
||||
private fun configureColumnChartAndBarChartStyle() {
|
||||
aaChartModel
|
||||
.categories(arrayOf("Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Spe", "Oct", "Nov", "Dec"))
|
||||
.colorsTheme(arrayOf("#fe117c", "#ffc069", "#06caf4", "#7dffc0"))
|
||||
.animationType(AAChartAnimationType.EaseInCubic)
|
||||
.animationDuration(1200)
|
||||
}
|
||||
|
||||
private fun configureAreaChartAndAreasplineChartStyle(chartType:String) {
|
||||
aaChartModel
|
||||
.animationType(AAChartAnimationType.EaseOutQuart)
|
||||
.markerRadius(5f)
|
||||
.markerSymbol(AAChartSymbolType.Circle)
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
|
||||
|
||||
if (chartType == AAChartType.Areaspline.value) {
|
||||
val gradientColorDic = AAGradientColor.linearGradient(
|
||||
AALinearGradientDirection.ToBottomRight,
|
||||
"rgba(138,43,226,1)",
|
||||
"rgba(30,144,255,1)" //颜色字符串设置支持十六进制类型和 rgba 类型
|
||||
)
|
||||
|
||||
val element1 = AASeriesElement()
|
||||
.name("Predefined symbol")
|
||||
.data(arrayOf(0.45, 0.43, 0.50, 0.55, 0.58, 0.62, 0.83, 0.39, 0.56, 0.67, 0.50, 0.34, 0.50, 0.67, 0.58, 0.29, 0.46, 0.23, 0.47, 0.46, 0.38, 0.56, 0.48, 0.36))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("Image symbol")
|
||||
.data(arrayOf(0.38, 0.31, 0.32, 0.32, 0.64, 0.66, 0.86, 0.47, 0.52, 0.75, 0.52, 0.56, 0.54, 0.60, 0.46, 0.63, 0.54, 0.51, 0.58, 0.64, 0.60, 0.45, 0.36, 0.67))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("Base64 symbol (*)")
|
||||
.data(arrayOf(0.46, 0.32, 0.53, 0.58, 0.86, 0.68, 0.85, 0.73, 0.69, 0.71, 0.91, 0.74, 0.60, 0.50, 0.39, 0.67, 0.55, 0.49, 0.65, 0.45, 0.64, 0.47, 0.63, 0.64))
|
||||
|
||||
val element4 = AASeriesElement()
|
||||
.name("Custom symbol")
|
||||
.data(arrayOf(0.60, 0.51, 0.52, 0.53, 0.64, 0.84, 0.65, 0.68, 0.63, 0.47, 0.72, 0.60, 0.65, 0.74, 0.66, 0.65, 0.71, 0.59, 0.65, 0.77, 0.52, 0.53, 0.58, 0.53))
|
||||
|
||||
|
||||
aaChartModel
|
||||
.animationType(AAChartAnimationType.EaseFrom)//设置图表渲染动画类型为 EaseFrom
|
||||
.series(arrayOf(element1, element2, element3, element4))
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureLineChartAndSplineChartStyle(chartType: String) {
|
||||
aaChartModel
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.BorderBlank)//设置折线连接点样式为:边缘白色
|
||||
.markerRadius(6f)
|
||||
if (chartType == AAChartType.Spline.value) {
|
||||
val element1 = AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.lineWidth(7f)
|
||||
.data(arrayOf(50, 320, 230, 370, 230, 400))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("Berlin")
|
||||
.lineWidth(7f)
|
||||
.data(arrayOf(80, 390, 210, 340, 240, 350))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("New York")
|
||||
.lineWidth(7f)
|
||||
.data(arrayOf(100, 370, 180, 280, 260, 300))
|
||||
|
||||
val element4 = AASeriesElement()
|
||||
.name("London")
|
||||
.lineWidth(7f)
|
||||
.data(arrayOf(130, 350, 160, 310, 250, 268))
|
||||
|
||||
aaChartModel
|
||||
.animationType(AAChartAnimationType.SwingFromTo)
|
||||
.series(arrayOf(element1, element2, element3, element4))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun convertStringToEnum(chartTypeStr: String): AAChartType {
|
||||
var chartTypeEnum = AAChartType.Column
|
||||
when (chartTypeStr) {
|
||||
AAChartType.Column.value -> chartTypeEnum = AAChartType.Column
|
||||
AAChartType.Bar.value -> chartTypeEnum = AAChartType.Bar
|
||||
AAChartType.Area.value -> chartTypeEnum = AAChartType.Area
|
||||
AAChartType.Areaspline.value -> chartTypeEnum = AAChartType.Areaspline
|
||||
AAChartType.Line.value -> chartTypeEnum = AAChartType.Line
|
||||
AAChartType.Spline.value -> chartTypeEnum = AAChartType.Spline
|
||||
}
|
||||
return chartTypeEnum
|
||||
}
|
||||
|
||||
|
||||
private fun setUpRadioButtonsAndSwitches() {
|
||||
val stackingTypeRadioGroup = findViewById<RadioGroup>(R.id.stackingTypeRadioGroup)
|
||||
stackingTypeRadioGroup.setOnCheckedChangeListener(this)
|
||||
|
||||
val cornerStyleTypeRadioGroup = findViewById<RadioGroup>(R.id.cornerStyleTypeRadioGroup)
|
||||
cornerStyleTypeRadioGroup.setOnCheckedChangeListener(this)
|
||||
|
||||
val markerSymbolTypeRadioGroup: RadioGroup = findViewById(R.id.markerSymbolTypeRadioGroup)
|
||||
markerSymbolTypeRadioGroup.setOnCheckedChangeListener(this)
|
||||
|
||||
val boolSwitch1: Switch = findViewById(R.id.xReversedSwitch)
|
||||
boolSwitch1.setOnCheckedChangeListener(this)
|
||||
|
||||
val boolSwitch2: Switch = findViewById(R.id.yReversedSwitch)
|
||||
boolSwitch2.setOnCheckedChangeListener(this)
|
||||
|
||||
val boolSwitch3: Switch = findViewById(R.id.polarSwitch)
|
||||
boolSwitch3.setOnCheckedChangeListener(this)
|
||||
|
||||
val boolSwitch4: Switch = findViewById(R.id.xInvertedSwitch)
|
||||
boolSwitch4.setOnCheckedChangeListener(this)
|
||||
|
||||
val boolSwitch5: Switch = findViewById(R.id.dataShowSwitch)
|
||||
boolSwitch5.setOnCheckedChangeListener(this)
|
||||
|
||||
val boolSwitch6: Switch = findViewById(R.id.markerHideSwitch)
|
||||
boolSwitch6.setOnCheckedChangeListener(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写的状态改变的事件的方法
|
||||
* @param group 单选组合框
|
||||
* @param checkedId 其中的每个RadioButton的Id
|
||||
*/
|
||||
override fun onCheckedChanged(group: RadioGroup, checkedId: Int) {
|
||||
if (group.id == R.id.stackingTypeRadioGroup) {
|
||||
when (group.checkedRadioButtonId) {
|
||||
R.id.noStackingRadio -> aaChartModel.stacking(AAChartStackingType.False)
|
||||
R.id.normalStackingRadio -> aaChartModel.stacking(AAChartStackingType.Normal)
|
||||
R.id.percentStackingRadio -> aaChartModel.stacking(AAChartStackingType.Percent)
|
||||
}
|
||||
} else {
|
||||
if (aaChartModel.chartType == AAChartType.Bar
|
||||
|| aaChartModel.chartType == AAChartType.Column
|
||||
) {
|
||||
when (group.checkedRadioButtonId) {
|
||||
R.id.squareCornersRadio -> aaChartModel.borderRadius(1f)
|
||||
R.id.roundedCornersRadio -> aaChartModel.borderRadius(10f)
|
||||
R.id.wedgeCornersRadio -> aaChartModel.borderRadius(1000f)
|
||||
}
|
||||
} else {
|
||||
when (group.checkedRadioButtonId) {
|
||||
R.id.circleSymbolRadio -> aaChartModel.markerSymbol(AAChartSymbolType.Circle)
|
||||
R.id.squareSymbolRadio -> aaChartModel.markerSymbol(AAChartSymbolType.Square)
|
||||
R.id.diamondSymbolRadio -> aaChartModel.markerSymbol(AAChartSymbolType.Diamond)
|
||||
R.id.triangleSymbolRadio -> aaChartModel.markerSymbol(AAChartSymbolType.Triangle)
|
||||
R.id.triangleDownSymbolRadio -> aaChartModel.markerSymbol(AAChartSymbolType.TriangleDown)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
aaChartView?.aa_refreshChartWithChartModel(aaChartModel)
|
||||
}
|
||||
|
||||
override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
|
||||
when (buttonView.id) {
|
||||
R.id.xReversedSwitch -> aaChartModel.xAxisReversed(isChecked)
|
||||
R.id.yReversedSwitch -> aaChartModel.yAxisReversed(isChecked)
|
||||
R.id.xInvertedSwitch -> aaChartModel.inverted(isChecked)
|
||||
R.id.polarSwitch -> aaChartModel.polar(isChecked)
|
||||
R.id.dataShowSwitch -> aaChartModel.dataLabelsEnabled(isChecked)
|
||||
R.id.markerHideSwitch -> aaChartModel.markerRadius(if (isChecked) 0f else 6f)
|
||||
}
|
||||
|
||||
aaChartView?.aa_refreshChartWithChartModel(aaChartModel)
|
||||
}
|
||||
|
||||
override fun chartViewDidFinishLoad(aaChartView: AAChartView) {
|
||||
println("🔥图表加载完成回调方法 ")
|
||||
}
|
||||
|
||||
override fun chartViewMoveOverEventMessage(
|
||||
aaChartView: AAChartView,
|
||||
messageModel: AAMoveOverEventMessageModel
|
||||
) {
|
||||
val gson = Gson()
|
||||
println("🚀move over event message " + gson.toJson(messageModel))
|
||||
}
|
||||
}
|
||||
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.basiccontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartModel
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.CustomStyleChartComposer
|
||||
|
||||
class CustomStyleChartActivity : AppCompatActivity() {
|
||||
|
||||
private var aaChartModel: AAChartModel? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_custom_style_chart)
|
||||
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
|
||||
aaChartModel = configureTheAAChartModel(chartType!!)
|
||||
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartModel(aaChartModel!!)
|
||||
}
|
||||
|
||||
private fun configureTheAAChartModel(chartType: String): AAChartModel {
|
||||
when (chartType) {
|
||||
"colorfulChart" ->
|
||||
return CustomStyleChartComposer.configureColorfulChart()
|
||||
"gradientColorfulChart" ->
|
||||
return CustomStyleChartComposer.configureColorfulGradientColorChart()
|
||||
"discontinuousDataChart" ->
|
||||
return CustomStyleChartComposer.configureDiscontinuousDataChart()
|
||||
"colorfulColumnChart" ->
|
||||
return CustomStyleChartComposer.configureColorfulColumnChart()
|
||||
"nightingaleRoseChart" ->
|
||||
return CustomStyleChartComposer.configureNightingaleRoseChart()
|
||||
"chartWithShadowStyle" ->
|
||||
return CustomStyleChartComposer.configureChartWithShadowStyle()
|
||||
"colorfulGradientAreaChart" ->
|
||||
return CustomStyleChartComposer.configureColorfulGradientAreaChart()
|
||||
"colorfulGradientSplineChart" ->
|
||||
return CustomStyleChartComposer.configureColorfulGradientSplineChart()
|
||||
"gradientColorAreasplineChart" ->
|
||||
return CustomStyleChartComposer.configureGradientColorAreasplineChart()
|
||||
"SpecialStyleMarkerOfSingleDataElementChart" ->
|
||||
return CustomStyleChartComposer.configureSpecialStyleMarkerOfSingleDataElementChart()
|
||||
"SpecialStyleColumnOfSingleDataElementChart" ->
|
||||
return CustomStyleChartComposer.configureSpecialStyleColumnOfSingleDataElementChart()
|
||||
"AreaChartThreshold" ->
|
||||
return CustomStyleChartComposer.configureAreaChartThreshold()
|
||||
"customScatterChartMarkerSymbolContent" ->
|
||||
return CustomStyleChartComposer.customScatterChartMarkerSymbolContent()
|
||||
"customLineChartMarkerSymbolContent" ->
|
||||
return CustomStyleChartComposer.customLineChartMarkerSymbolContent()
|
||||
"TriangleRadarChart" ->
|
||||
return CustomStyleChartComposer.configureTriangleRadarChart()
|
||||
"QuadrangleRadarChart" ->
|
||||
return CustomStyleChartComposer.configureQuadrangleRadarChart()
|
||||
"PentagonRadarChart" ->
|
||||
return CustomStyleChartComposer.configurePentagonRadarChart()
|
||||
"HexagonRadarChart" ->
|
||||
return CustomStyleChartComposer.configureHexagonRadarChart()
|
||||
|
||||
"adjustYAxisMaxAndMinValues"-> return CustomStyleChartComposer.adjustYAxisMaxAndMinValues()
|
||||
"customSpecialStyleDataLabelOfSingleDataElementChart"-> return CustomStyleChartComposer.customSpecialStyleDataLabelOfSingleDataElementChart()
|
||||
"customBarChartHoverColorAndSelectColor"-> return CustomStyleChartComposer.customBarChartHoverColorAndSelectColor()
|
||||
"customChartHoverAndSelectHaloStyle"-> return CustomStyleChartComposer.customChartHoverAndSelectHaloStyle()
|
||||
"customSplineChartMarkerStatesHoverStyle"-> return CustomStyleChartComposer.customSplineChartMarkerStatesHoverStyle()
|
||||
"splineChartHoverLineWithNoChangeAndCustomMarkerStatesHoverStyle" -> return CustomStyleChartComposer.splineChartHoverLineWithNoChangeAndCustomMarkerStatesHoverStyle()
|
||||
"customNormalStackingChartDataLabelsContentAndStyle"-> return CustomStyleChartComposer.customNormalStackingChartDataLabelsContentAndStyle()
|
||||
"upsideDownPyramidChart"-> return CustomStyleChartComposer.upsideDownPyramidChart()
|
||||
"doubleLayerPieChart"-> return CustomStyleChartComposer.doubleLayerPieChart()
|
||||
"disableSomeOfLinesMouseTrackingEffect"-> return CustomStyleChartComposer.disableSomeOfLinesMouseTrackingEffect()
|
||||
"configureColorfulShadowSplineChart"-> return CustomStyleChartComposer.configureColorfulShadowSplineChart()
|
||||
"configureColorfulDataLabelsStepLineChart"-> return CustomStyleChartComposer.configureColorfulDataLabelsStepLineChart()
|
||||
"configureColorfulGradientColorAndColorfulDataLabelsStepAreaChart"-> return CustomStyleChartComposer.configureColorfulGradientColorAndColorfulDataLabelsStepAreaChart()
|
||||
"disableSplineChartMarkerHoverEffect"-> return CustomStyleChartComposer.disableSplineChartMarkerHoverEffect()
|
||||
"configureMaxAndMinDataLabelsForChart"-> return CustomStyleChartComposer.configureMaxAndMinDataLabelsForChart()
|
||||
"customVerticalXAxisCategoriesLabelsByHTMLBreakLineTag"-> return CustomStyleChartComposer.customVerticalXAxisCategoriesLabelsByHTMLBreakLineTag()
|
||||
|
||||
"noMoreGroupingAndOverlapEachOtherColumnChart" ->
|
||||
return CustomStyleChartComposer.noMoreGroupingAndOverlapEachOtherColumnChart()
|
||||
"noMoreGroupingAndNestedColumnChart" ->
|
||||
return CustomStyleChartComposer.noMoreGroupingAndNestedColumnChart()
|
||||
"topRoundedCornersStackingColumnChart" ->
|
||||
return CustomStyleChartComposer.topRoundedCornersStackingColumnChart()
|
||||
"freeStyleRoundedCornersStackingColumnChart" ->
|
||||
return CustomStyleChartComposer.freeStyleRoundedCornersStackingColumnChart()
|
||||
"customColumnChartBorderStyleAndStatesHoverColor" ->
|
||||
return CustomStyleChartComposer.customColumnChartBorderStyleAndStatesHoverColor()
|
||||
|
||||
"customLineChartWithColorfulMarkersAndLines" ->
|
||||
return CustomStyleChartComposer.customLineChartWithColorfulMarkersAndLines()
|
||||
"customLineChartWithColorfulMarkersAndLines2" ->
|
||||
return CustomStyleChartComposer.customLineChartWithColorfulMarkersAndLines2()
|
||||
"drawLineChartWithPointsCoordinates" ->
|
||||
return CustomStyleChartComposer.drawLineChartWithPointsCoordinates()
|
||||
"configureSpecialStyleColumnForNegativeDataMixedPositiveData" ->
|
||||
return CustomStyleChartComposer.configureSpecialStyleColumnForNegativeDataMixedPositiveData()
|
||||
"configureMultiLevelStopsArrGradientColorAreasplineMixedLineChart" ->
|
||||
return CustomStyleChartComposer.configureMultiLevelStopsArrGradientColorAreasplineMixedLineChart()
|
||||
"connectNullsForSingleAASeriesElement" ->
|
||||
return CustomStyleChartComposer.connectNullsForSingleAASeriesElement()
|
||||
"lineChartsWithLargeDifferencesInTheNumberOfDataInDifferentSeriesElement" ->
|
||||
return CustomStyleChartComposer.lineChartsWithLargeDifferencesInTheNumberOfDataInDifferentSeriesElement()
|
||||
"customAreasplineChartWithColorfulGradientColorZones" ->
|
||||
return CustomStyleChartComposer.customAreasplineChartWithColorfulGradientColorZones()
|
||||
|
||||
|
||||
}
|
||||
return CustomStyleChartComposer.configureColorfulChart()
|
||||
}
|
||||
}
|
||||
+615
@@ -0,0 +1,615 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.basiccontent
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.widget.ExpandableListView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.additionalcontent.*
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
private val chartTypeNameArr =
|
||||
arrayOf(
|
||||
arrayOf(
|
||||
"Column Chart---柱形图",
|
||||
"Bar Chart---条形图",
|
||||
"Area Chart---折线填充图",
|
||||
"Areaspline Chart---曲线填充图",
|
||||
"Step Area Chart---直方折线填充图",
|
||||
"Step Line Chart---直方折线图",
|
||||
"Line Chart---折线图",
|
||||
"Spline Chart---曲线图"
|
||||
), arrayOf(
|
||||
"Polar Column Chart---玫瑰图",
|
||||
"Polar Bar Chart---径向条形图",
|
||||
"Polar Line Chart---蜘蛛图",
|
||||
"Polar Area Chart---雷达图",
|
||||
"Step Line Chart---直方折线图",
|
||||
"Step Area Chart---直方折线填充图",
|
||||
"Pie Chart---扇形图",
|
||||
"Bubble Chart---气泡图",
|
||||
"Scatter Chart---散点图",
|
||||
"Arearange Chart---区域范围图",
|
||||
"Columnrange Chart---柱形范围图",
|
||||
"Boxplot Chart---箱线图",
|
||||
"Waterfall Chart---瀑布图",
|
||||
"Pyramid Chart---金字塔图",
|
||||
"Funnel Chart---漏斗图",
|
||||
"Errorbar Chart---误差图",
|
||||
"Gauge Chart---仪表图",
|
||||
"Polygon Chart---多边形图"
|
||||
), arrayOf(
|
||||
"arearangeMixedLine",
|
||||
"columnrangeMixedLine",
|
||||
"stackingColumnMixedLine",
|
||||
"dashStyleTypeMixed",
|
||||
"negativeColorMixed",
|
||||
"scatterMixedLine",
|
||||
"negativeColorMixedBubble",
|
||||
"polygonMixedScatter",
|
||||
"polarChartMixed",
|
||||
"configurePieMixedLineMixedColumnChart",
|
||||
"configureNegativeColorMixedAreasplineChart",
|
||||
), arrayOf(
|
||||
"colorfulChart",
|
||||
"gradientColorfulChart",
|
||||
"discontinuousDataChart",
|
||||
"colorfulColumnChart",
|
||||
"nightingaleRoseChart",
|
||||
"chartWithShadowStyle",
|
||||
"colorfulGradientAreaChart",
|
||||
"colorfulGradientSplineChart",
|
||||
"gradientColorAreasplineChart",
|
||||
"SpecialStyleMarkerOfSingleDataElementChart",
|
||||
"SpecialStyleColumnOfSingleDataElementChart",
|
||||
"AreaChartThreshold",
|
||||
"customScatterChartMarkerSymbolContent",
|
||||
"customLineChartMarkerSymbolContent",
|
||||
"TriangleRadarChart",
|
||||
"QuadrangleRadarChart",
|
||||
"PentagonRadarChart",
|
||||
"HexagonRadarChart",
|
||||
"adjustYAxisMaxAndMinValues---调整 X 轴和 Y 轴最大值",
|
||||
"custom Special Style DataLabel Of Single Data Element Chart---指定单个数据元素的 DataLabel 为特殊样式",
|
||||
"custom Bar Chart Hover Color and Select Color---自定义条形图手指滑动颜色和单个长条被选中颜色",
|
||||
"custom Line Chart Chart Hover And Select Halo Style---自定义直线图手指略过和选中的 Halo 样式",
|
||||
"custom Spline Chart Marker States Hover Style---自定义曲线图手指略过时的 Marker 样式",
|
||||
"splineChartHoverLineWithNoChangeAndCustomMarkerStatesHoverStyle---曲线图手指掠过时的 Hover 线不变形,并且自定义 Marker 样式",
|
||||
"customNormalStackingChartDataLabelsContentAndStyle---自定义堆积柱状图 DataLabels 的内容及样式",
|
||||
"upsideDownPyramidChart---倒立的金字塔图",
|
||||
"doubleLayerPieChart---双层嵌套扇形图",
|
||||
"disableSomeOfLinesMouseTrackingEffect---针对部分数据列关闭鼠标或手指跟踪行为",
|
||||
"configureColorfulShadowChart---彩色阴影效果的曲线图",
|
||||
"configureColorfulDataLabelsStepLineChart---彩色 DataLabels 的直方折线图",
|
||||
"configureColorfulGradientColorAndColorfulDataLabelsStepAreaChart---彩色渐变效果且彩色 DataLabels 的直方折线填充图",
|
||||
"disableSplineChartMarkerHoverEffect---禁用曲线图的手指滑动 marker 点的光圈变化放大的效果",
|
||||
"configureMaxAndMinDataLabelsForChart---为图表最大值最小值添加 DataLabels 标记",
|
||||
"customVerticalXAxisCategoriesLabelsByHTMLBreakLineTag---通过 HTML 的换行标签来实现图表的 X 轴的 分类文字标签的换行效果",
|
||||
"noMoreGroupingAndOverlapEachOtherColumnChart---不分组的相互重叠柱状图📊",
|
||||
"noMoreGroupingAndNestedColumnChart---不分组的嵌套柱状图📊",
|
||||
"topRoundedCornersStackingColumnChart---顶部为圆角的堆积柱状图📊",
|
||||
"freeStyleRoundedCornersStackingColumnChart---各个圆角自由独立设置的堆积柱状图📊",
|
||||
"customColumnChartBorderStyleAndStatesHoverColor---自定义柱状图 border 样式及手指掠过图表 series 元素时的柱形颜色",
|
||||
|
||||
"customLineChartWithColorfulMarkersAndLines---彩色连接点和连接线的折线图📈",
|
||||
"customLineChartWithColorfulMarkersAndLines2---彩色连接点和连接线的多组折线的折线图📈",
|
||||
"drawLineChartWithPointsCoordinates---通过点坐标来绘制折线图",
|
||||
"configureSpecialStyleColumnForNegativeDataMixedPositiveData---为正负数混合的柱形图自定义特殊样式效果",
|
||||
"configureMultiLevelStopsArrGradientColorAreasplineMixedLineChart---多层次半透明渐变效果的曲线填充图混合折线图📈",
|
||||
"connectNullsForSingleAASeriesElement---为单个 AASeriesElement 单独设置是否断点重连",
|
||||
"lineChartsWithLargeDifferencesInTheNumberOfDataInDifferentSeriesElement---不同数据列数据量差异较大的折线图",
|
||||
"customAreasplineChartWithColorfulGradientColorZones---彩色渐变填充区域曲线图",
|
||||
), arrayOf(
|
||||
"customLegendStyle",
|
||||
"drawChartWithOptionsOne",
|
||||
"AAPlotLinesForChart",
|
||||
"customAATooltipWithJSFunction",
|
||||
"customXAxisCrosshairStyle",
|
||||
"XAxisLabelsFontColorWithHTMLString",
|
||||
"XAxisLabelsFontColorAndFontSizeWithHTMLString",
|
||||
"_DataLabels_XAXis_YAxis_Legend_Style",
|
||||
"XAxisPlotBand",
|
||||
"configureTheMirrorColumnChart",
|
||||
"configureDoubleYAxisChartOptions",
|
||||
"configureTripleYAxesMixedChart",
|
||||
"customLineChartDataLabelsFormat",
|
||||
"configureDoubleYAxesAndColumnLineMixedChart",
|
||||
"configureDoubleYAxesMarketDepthChart",
|
||||
"customAreaChartTooltipStyleLikeHTMLTable",
|
||||
"simpleGaugeChart",
|
||||
"gaugeChartWithPlotBand",
|
||||
"doubleLayerHalfPieChart",
|
||||
), arrayOf(
|
||||
"Column Chart---柱形图",
|
||||
"Bar Chart---条形图",
|
||||
"Area Chart---折线填充图",
|
||||
"Areaspline Chart---曲线填充图",
|
||||
"Step Area Chart---直方折线填充图",
|
||||
"Step Line Chart---直方折线图",
|
||||
"Line Chart---折线图",
|
||||
"Spline Chart---曲线图",
|
||||
"Scatter Chart---散点图"
|
||||
), arrayOf(
|
||||
"简单字符串拼接",
|
||||
"自定义不同单位后缀",
|
||||
"自定义多彩颜色文字",
|
||||
"值为0时,在tooltip中不显示",
|
||||
"自定义箱线图的浮动提示框头部内容",
|
||||
"自定义Y轴文字",
|
||||
"自定义Y轴文字2",
|
||||
"自定义分组堆积柱状图tooltip内容",
|
||||
"双 X 轴镜像图表",
|
||||
"customArearangeChartTooltip---自定义折线范围图的tooltip",
|
||||
"调整折线图的 X 轴左边距",
|
||||
"通过来自外部的数据源来自定义 tooltip (而非常规的来自图表的 series)"
|
||||
), arrayOf(
|
||||
"eval JS function 1",
|
||||
"eval JS function 2",
|
||||
"eval JS function 3"
|
||||
), arrayOf(
|
||||
"doubleChartsLinkedWork"
|
||||
), arrayOf(
|
||||
"Column Chart---柱形图",
|
||||
"Bar Chart---条形图",
|
||||
"Area Chart---折线填充图",
|
||||
"Areaspline Chart---曲线填充图",
|
||||
"Step Area Chart---直方折线填充图",
|
||||
"Step Line Chart---直方折线图",
|
||||
"Line Chart---折线图",
|
||||
"Spline Chart---曲线图"
|
||||
), arrayOf(
|
||||
"Column Chart---柱形图",
|
||||
"Bar Chart---条形图",
|
||||
"Area Chart---折线填充图",
|
||||
"Areaspline Chart---曲线填充图",
|
||||
"Step Area Chart---直方折线填充图",
|
||||
"Step Line Chart---直方折线图",
|
||||
"Line Chart---折线图",
|
||||
"Spline Chart---曲线图"
|
||||
),
|
||||
/*JS Function For AAAXis Labels*/
|
||||
arrayOf(
|
||||
"customYAxisLabels---自定义Y轴文字",
|
||||
"customYAxisLabels2---自定义Y轴文字2",
|
||||
"customAreaChartXAxisLabelsTextUnitSuffix1---自定义X轴文字单位后缀(通过 formatter 函数)",
|
||||
"customAreaChartXAxisLabelsTextUnitSuffix2---自定义X轴文字单位后缀(不通过 formatter 函数)",
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart---配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 1",
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart2---配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 2",
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart3---配置双 Y 轴图表的 Y 轴文字标签的 Formatter 函数 示例 3",
|
||||
"customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters---通过截取前四个字符来自定义 X 轴 labels",
|
||||
"customSpiderChartStyle---自定义蜘蛛🕷🕸图样式",
|
||||
"customizeEveryDataLabelSinglelyByDataLabelsFormatter---通过 DataLabels 的 formatter 函数来实现单个数据标签🏷自定义",
|
||||
"customXAxisLabelsBeImages---自定义 X轴 labels 为一组图片"
|
||||
),
|
||||
/*JS Function For AALegend*/
|
||||
arrayOf(
|
||||
"disableLegendClickEventForNormalChart---禁用常规图表 legend 点击事件",
|
||||
"disableLegendClickEventForPieChart---禁用饼图 legend 点击事件",
|
||||
"customLegendItemClickEvent---自定义图例 legend 的点击事件"
|
||||
),
|
||||
/*JS Function For AAChartEvents*/
|
||||
arrayOf(
|
||||
"setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart---图表加载完成后设置 crosshair 和 tooltip 到默认位置",
|
||||
"generalDrawingChart---普通绘图",
|
||||
"advancedTimeLineChart---高级时间轴绘图",
|
||||
"configureBlinkMarkerChart---配置闪烁特效的 marker 图表",
|
||||
"configureSpecialStyleMarkerOfSingleDataElementChartWithBlinkEffect---配置闪烁特效的 marker 图表2",
|
||||
"configureScatterChartWithBlinkEffect---配置闪烁特效的散点图",
|
||||
"automaticallyHideTooltipAfterItIsShown---在浮动提示框显示后自动隐藏",
|
||||
"dynamicHeightGridLineAreaChart---动态高度的网格线区域填充图",
|
||||
"customizeYAxisPlotLinesLabelBeSpecialStyle---自定义 Y 轴轴线上面的标签文字特殊样式",
|
||||
"configureECGStyleChart---配置心电图样式图表",
|
||||
),
|
||||
/*JS Function For AAOptions*/
|
||||
arrayOf(
|
||||
"customDoubleXAxesChart---自定义双 X 轴图表",
|
||||
"disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction---通过 Series 的 Point 的选中事件函数来禁用条形图反选效果",
|
||||
"customizeEveryDataLabelSinglelyByDataLabelsFormatter---通过 formatter 来自定义单个 dataLabels 元素",
|
||||
"configureColorfulDataLabelsForPieChart---为饼图配置多彩 dataLabels"
|
||||
),
|
||||
)
|
||||
private val chartTypeArr =
|
||||
arrayOf(
|
||||
arrayOf( /*基础类型图表*/
|
||||
AAChartType.Column.value,
|
||||
AAChartType.Bar.value,
|
||||
AAChartType.Area.value,
|
||||
AAChartType.Areaspline.value,
|
||||
AAChartType.Area.value,
|
||||
AAChartType.Line.value,
|
||||
AAChartType.Line.value,
|
||||
AAChartType.Spline.value
|
||||
), arrayOf(
|
||||
/*特殊类型图表*/
|
||||
AAChartType.Column.value,
|
||||
AAChartType.Bar.value,
|
||||
AAChartType.Line.value,
|
||||
AAChartType.Area.value,
|
||||
AAChartType.Spline.value,
|
||||
AAChartType.Areaspline.value,
|
||||
AAChartType.Pie.value,
|
||||
AAChartType.Bubble.value,
|
||||
AAChartType.Scatter.value,
|
||||
AAChartType.Arearange.value,
|
||||
AAChartType.Columnrange.value,
|
||||
AAChartType.Boxplot.value,
|
||||
AAChartType.Waterfall.value,
|
||||
AAChartType.Pyramid.value,
|
||||
AAChartType.Funnel.value,
|
||||
AAChartType.Errorbar.value,
|
||||
AAChartType.Gauge.value,
|
||||
AAChartType.Polygon.value,
|
||||
), arrayOf(
|
||||
/*Mixed Chart---混合图*/
|
||||
"arearangeMixedLine",
|
||||
"columnrangeMixedLine",
|
||||
"stackingColumnMixedLine",
|
||||
"dashStyleTypeMixed",
|
||||
"negativeColorMixed",
|
||||
"scatterMixedLine",
|
||||
"negativeColorMixedBubble",
|
||||
"polygonMixedScatter",
|
||||
"polarChartMixed",
|
||||
"configurePieMixedLineMixedColumnChart",
|
||||
"configureNegativeColorMixedAreasplineChart",
|
||||
), arrayOf(
|
||||
/*自定义样式图表*/
|
||||
"colorfulChart",
|
||||
"gradientColorfulChart",
|
||||
"discontinuousDataChart",
|
||||
"colorfulColumnChart",
|
||||
"nightingaleRoseChart",
|
||||
"chartWithShadowStyle",
|
||||
"colorfulGradientAreaChart",
|
||||
"colorfulGradientSplineChart",
|
||||
"gradientColorAreasplineChart",
|
||||
"SpecialStyleMarkerOfSingleDataElementChart",
|
||||
"SpecialStyleColumnOfSingleDataElementChart",
|
||||
"AreaChartThreshold",
|
||||
"customScatterChartMarkerSymbolContent",
|
||||
"customLineChartMarkerSymbolContent",
|
||||
"TriangleRadarChart",
|
||||
"QuadrangleRadarChart",
|
||||
"PentagonRadarChart",
|
||||
"HexagonRadarChart",
|
||||
"adjustYAxisMaxAndMinValues",
|
||||
"customSpecialStyleDataLabelOfSingleDataElementChart",
|
||||
"customBarChartHoverColorAndSelectColor",
|
||||
"customChartHoverAndSelectHaloStyle",
|
||||
"customSplineChartMarkerStatesHoverStyle",
|
||||
"splineChartHoverLineWithNoChangeAndCustomMarkerStatesHoverStyle",
|
||||
"customNormalStackingChartDataLabelsContentAndStyle",
|
||||
"upsideDownPyramidChart",
|
||||
"doubleLayerPieChart",
|
||||
"disableSomeOfLinesMouseTrackingEffect",
|
||||
"configureColorfulShadowSplineChart",
|
||||
"configureColorfulDataLabelsStepLineChart",
|
||||
"configureColorfulGradientColorAndColorfulDataLabelsStepAreaChart",
|
||||
"disableSplineChartMarkerHoverEffect",
|
||||
"configureMaxAndMinDataLabelsForChart",
|
||||
"customVerticalXAxisCategoriesLabelsByHTMLBreakLineTag",
|
||||
"noMoreGroupingAndOverlapEachOtherColumnChart",
|
||||
"noMoreGroupingAndNestedColumnChart",
|
||||
"topRoundedCornersStackingColumnChart",
|
||||
"freeStyleRoundedCornersStackingColumnChart",
|
||||
"customColumnChartBorderStyleAndStatesHoverColor",
|
||||
|
||||
"customLineChartWithColorfulMarkersAndLines",
|
||||
"customLineChartWithColorfulMarkersAndLines2",
|
||||
"drawLineChartWithPointsCoordinates",
|
||||
"configureSpecialStyleColumnForNegativeDataMixedPositiveData",
|
||||
"configureMultiLevelStopsArrGradientColorAreasplineMixedLineChart",
|
||||
"connectNullsForSingleAASeriesElement",
|
||||
"lineChartsWithLargeDifferencesInTheNumberOfDataInDifferentSeriesElement",
|
||||
"customAreasplineChartWithColorfulGradientColorZones",
|
||||
), arrayOf( /*使用AAOptions绘制图表*/
|
||||
"customLegendStyle",
|
||||
"AAPlotBandsForChart",
|
||||
"AAPlotLinesForChart",
|
||||
"customAATooltipWithJSFunction",
|
||||
"customXAxisCrosshairStyle",
|
||||
"XAxisLabelsFontColorWithHTMLString",
|
||||
"XAxisLabelsFontColorAndFontSizeWithHTMLString",
|
||||
"_DataLabels_XAXis_YAxis_Legend_Style",
|
||||
"XAxisPlotBand",
|
||||
"configureTheMirrorColumnChart",
|
||||
"configureDoubleYAxisChartOptions",
|
||||
"configureTripleYAxesMixedChart",
|
||||
"customLineChartDataLabelsFormat",
|
||||
"configureDoubleYAxesAndColumnLineMixedChart",
|
||||
"configureDoubleYAxesMarketDepthChart",
|
||||
"customAreaChartTooltipStyleLikeHTMLTable",
|
||||
"simpleGaugeChart",
|
||||
"gaugeChartWithPlotBand",
|
||||
"doubleLayerHalfPieChart"
|
||||
), arrayOf( /*即时刷新📈📊图表数据*/
|
||||
AAChartType.Column.value,
|
||||
AAChartType.Bar.value,
|
||||
AAChartType.Area.value,
|
||||
AAChartType.Areaspline.value,
|
||||
"stepArea",
|
||||
"stepLine",
|
||||
AAChartType.Line.value,
|
||||
AAChartType.Spline.value,
|
||||
AAChartType.Scatter.value
|
||||
), arrayOf( /*自定义 formatter 函数*/
|
||||
"customAreaChartTooltipStyleWithSimpleFormatString",
|
||||
"customAreaChartTooltipStyleWithDifferentUnitSuffix",
|
||||
"customAreaChartTooltipStyleWithColorfulHtmlLabels",
|
||||
"customLineChartTooltipStyleWhenValueBeZeroDoNotShow",
|
||||
"customBoxplotTooltipContent",
|
||||
"customYAxisLabels",
|
||||
"customYAxisLabels2",
|
||||
"customStackedAndGroupedColumnChartTooltip",
|
||||
"customDoubleXAxesChart",
|
||||
"customArearangeChartTooltip",
|
||||
"customLineChartOriginalPointPositionByConfiguringXAxisFormatterAndTooltipFormatter",
|
||||
"customTooltipWhichDataSourceComeFromOutSideRatherThanSeries"
|
||||
), arrayOf( /*执行由 JavaScript 字符串映射转换成的 js function 函数*/
|
||||
"evalJSFunction1",
|
||||
"evalJSFunction2",
|
||||
"evalJSFunction3"
|
||||
), arrayOf( /*Double Charts Linked Work---双表联动*/
|
||||
"doubleChartsLinkedWork"
|
||||
), arrayOf( /*Scrollable Chart---可滚动图表*/
|
||||
AAChartType.Column.value,
|
||||
AAChartType.Bar.value,
|
||||
AAChartType.Area.value,
|
||||
AAChartType.Areaspline.value,
|
||||
AAChartType.Area.value,
|
||||
AAChartType.Line.value,
|
||||
AAChartType.Line.value,
|
||||
AAChartType.Spline.value
|
||||
), arrayOf( /*高级更新*/
|
||||
AAChartType.Column.value,
|
||||
AAChartType.Bar.value,
|
||||
AAChartType.Area.value,
|
||||
AAChartType.Areaspline.value,
|
||||
AAChartType.Area.value,
|
||||
AAChartType.Line.value,
|
||||
AAChartType.Line.value,
|
||||
AAChartType.Spline.value
|
||||
),
|
||||
|
||||
arrayOf( /*JS Function For AAAXis Labels*/
|
||||
"customYAxisLabels",
|
||||
"customYAxisLabels2",
|
||||
"customAreaChartXAxisLabelsTextUnitSuffix1",
|
||||
"customAreaChartXAxisLabelsTextUnitSuffix2",
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart",
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart2",
|
||||
"configureTheAxesLabelsFormattersOfDoubleYAxesChart3",
|
||||
"customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters",
|
||||
"customSpiderChartStyle",
|
||||
"customizeEveryDataLabelSinglelyByDataLabelsFormatter",
|
||||
"customXAxisLabelsBeImages"
|
||||
),
|
||||
|
||||
arrayOf( /*JS Function For AALegend*/
|
||||
"disableLegendClickEventForNormalChart",
|
||||
"disableLegendClickEventForPieChart",
|
||||
"customLegendItemClickEvent"
|
||||
),
|
||||
|
||||
arrayOf( /*JS Function For AAChartEvents*/
|
||||
"setCrosshairAndTooltipToTheDefaultPositionAfterLoadingChart",
|
||||
"generalDrawingChart",
|
||||
"advancedTimeLineChart",
|
||||
"configureBlinkMarkerChart",
|
||||
"configureSpecialStyleMarkerOfSingleDataElementChartWithBlinkEffect",
|
||||
"configureScatterChartWithBlinkEffect",
|
||||
"automaticallyHideTooltipAfterItIsShown",
|
||||
"dynamicHeightGridLineAreaChart",
|
||||
"customizeYAxisPlotLinesLabelBeSpecialStyle",
|
||||
"configureECGStyleChart"
|
||||
),
|
||||
|
||||
arrayOf( /*JS Function For AAOptions*/
|
||||
"customDoubleXAxesChart",
|
||||
"disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction",
|
||||
"customizeEveryDataLabelSinglelyByDataLabelsFormatter",
|
||||
"configureColorfulDataLabelsForPieChart"
|
||||
),
|
||||
)
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
setupExpandableListView()
|
||||
}
|
||||
|
||||
private fun setupExpandableListView() {
|
||||
val groupTitleArr = arrayOf(
|
||||
"Basic Type Chart ---基础类型图表",
|
||||
"Special Type Chart ---特殊类型图表",
|
||||
"Mixed Chart ---混合图形",
|
||||
"Custom Style Chart---一些自定义风格样式图表",
|
||||
"Draw Chart With AAOptions---通过Options绘图",
|
||||
"Only Refresh data ---即时刷新图表数据",
|
||||
"JS Function For AAOptions ---通过带有 JS 函数的 Options 绘图",
|
||||
"Evaluate JS String Function---执行js函数",
|
||||
"Double Charts Linked Work---双表联动",
|
||||
"Scrollable chart ---可滚动の图表",
|
||||
"Chart Options Advanced Updating---图表高级更新",
|
||||
"JS Function For AAAxis Labels | 通过带有 JS 函数的自定义 AAAxis 的文字标签",
|
||||
"JS Function For AALegend | 通过带有 JS 函数的自定义 AALegend",
|
||||
"JS Function For AAChartEvents---通过 JSFunction 自定义 AAChartEvents 的事件",
|
||||
"JS Function For AAOptions---通过 JSFunction 自定义 AAOptions 内容",
|
||||
)
|
||||
val listView = findViewById<ExpandableListView>(R.id.exlist_lol)
|
||||
val myAdapter =
|
||||
MyBaseExpandableListAdapter(groupTitleArr, chartTypeNameArr, this)
|
||||
listView.setAdapter(myAdapter)
|
||||
|
||||
//为列表设置点击事件
|
||||
listView.setOnChildClickListener { parent, v, groupPosition, childPosition, id ->
|
||||
val chartType = chartTypeArr[groupPosition][childPosition] as String
|
||||
when (groupPosition) {
|
||||
0 -> goToCommonChartActivity(chartType, childPosition)
|
||||
1 -> goToSpecialChartActivity(chartType)
|
||||
2 -> goToMixedChartActivity(chartType)
|
||||
3 -> goToCustomStyleChartActivity(chartType)
|
||||
4 -> goToDrawChartWithAAOptionsActivity(chartType)
|
||||
5 -> goToOnlyRefreshChartDataActivity(chartType)
|
||||
6 -> goToCustomTooltipWithJSFunctionActivity(chartType)
|
||||
7 -> goToEvaluateJSStringFunctionActivity(chartType)
|
||||
8 -> goToDoubleChartsLinkedWorkActivity(chartType)
|
||||
9 -> goToScrollableChartActivity(chartType, childPosition)
|
||||
10 -> goToAdvancedUpdatingFeatureActivity(chartType,childPosition)
|
||||
11 -> goToJSFunctionForAAAxisActivity(chartType,childPosition)
|
||||
12 -> goToJSFunctionForAALegendActivity(chartType,childPosition)
|
||||
13 -> goToJSFunctionForAAChartEventsActivity(chartType,childPosition)
|
||||
14 -> goToJSFunctionForAAOptionsActivity(chartType,childPosition)
|
||||
}
|
||||
Toast.makeText(
|
||||
this@MainActivity,
|
||||
"你点击了:" + chartTypeNameArr[groupPosition][childPosition],
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
private fun goToCommonChartActivity(chartType: String?, position: Int) {
|
||||
val intent =
|
||||
Intent(this, BasicChartActivity::class.java)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
intent.putExtra("position", position)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToSpecialChartActivity(chartType: String?) {
|
||||
val intent =
|
||||
Intent(this, SpecialChartActivity::class.java)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToCustomStyleChartActivity(chartType: String?) {
|
||||
val intent =
|
||||
Intent(this, CustomStyleChartActivity::class.java)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToMixedChartActivity(chartType: String?) {
|
||||
val intent =
|
||||
Intent(this, MixedChartActivity::class.java)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToDrawChartWithAAOptionsActivity(chartType: String?) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
DrawChartWithAAOptionsActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToOnlyRefreshChartDataActivity(chartType: String?) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
OnlyRefreshChartDataActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToCustomTooltipWithJSFunctionActivity(chartType: String?) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
JSFormatterFunctionActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToEvaluateJSStringFunctionActivity(chartType: String?) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
EvaluateJSStringFunctionActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToHideOrShowChartSeriesActivity(chartType: String?) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
HideOrShowChartSeriesActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToDoubleChartsLinkedWorkActivity(chartType: String?) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
DoubleChartsLinkedWorkActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToScrollableChartActivity(chartType: String?, position: Int) {
|
||||
val intent =
|
||||
Intent(this, ScrollableChartActivity::class.java)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
intent.putExtra("position", position)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToAdvancedUpdatingFeatureActivity(chartType: String?, position: Int) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
AdvancedUpdatingFeatureActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
intent.putExtra("position", position)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToJSFunctionForAAAxisActivity(chartType: String?, position: Int) {
|
||||
val intent = Intent(this, JSFunctionForAAAxisActivity::class.java)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
intent.putExtra("position", position)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToJSFunctionForAALegendActivity(chartType: String?, position: Int) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
JSFunctionForAALegendActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
intent.putExtra("position", position)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToJSFunctionForAAChartEventsActivity(chartType: String?, position: Int) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
JSFunctionForAAChartEventsActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
intent.putExtra("position", position)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun goToJSFunctionForAAOptionsActivity(chartType: String?, position: Int) {
|
||||
val intent = Intent(
|
||||
this,
|
||||
JSFunctionForAAOptionsActivity::class.java
|
||||
)
|
||||
intent.putExtra(kChartTypeKey, chartType)
|
||||
intent.putExtra("position", position)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val kChartTypeKey = "chartType"
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.basiccontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartModel
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.MixedChartComposer
|
||||
|
||||
class MixedChartActivity : AppCompatActivity() {
|
||||
private var aaChartModel: AAChartModel? = null
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_mixed_chart)
|
||||
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
|
||||
this.aaChartModel = configureTheAAChartModel(chartType!!)
|
||||
|
||||
aaChartModel = configureTheAAChartModel(chartType)
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartModel(aaChartModel!!)
|
||||
}
|
||||
|
||||
|
||||
private fun configureTheAAChartModel(chartType: String): AAChartModel {
|
||||
when (chartType) {
|
||||
"arearangeMixedLine" -> return MixedChartComposer.arearangeMixedLine()
|
||||
"columnrangeMixedLine" -> return MixedChartComposer.configureColumnrangeMixedLineChart()
|
||||
"stackingColumnMixedLine" -> return MixedChartComposer.configureStackingColumnMixedLineChart()
|
||||
"dashStyleTypeMixed" -> return MixedChartComposer.dashStyleTypeMixedChart()
|
||||
"negativeColorMixed" -> return MixedChartComposer.negativeColorMixedChart()
|
||||
"scatterMixedLine" -> return MixedChartComposer.scatterMixedLine()
|
||||
"negativeColorMixedBubble" -> return MixedChartComposer.negativeColorMixedBubble()
|
||||
"polygonMixedScatter" -> return MixedChartComposer.polygonMixedScatter()
|
||||
"polarChartMixed" -> return MixedChartComposer.polarChartMixedChart()
|
||||
"configurePieMixedLineMixedColumnChart" -> return MixedChartComposer.configurePieMixedLineMixedColumnChart()
|
||||
"configureNegativeColorMixedAreasplineChart" -> return MixedChartComposer.configureNegativeColorMixedAreasplineChart()
|
||||
}
|
||||
return MixedChartComposer.arearangeMixedLine()
|
||||
}
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.basiccontent
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.BaseExpandableListAdapter
|
||||
import android.widget.TextView
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
|
||||
class MyBaseExpandableListAdapter(
|
||||
private val gData: Array<String>,
|
||||
private val iData: Array<Array<String>>,
|
||||
private val mContext: Context,
|
||||
private val colorsArr: Array<String> = arrayOf("#5470c6",
|
||||
"#91cc75",
|
||||
"#fac858",
|
||||
"#ee6666",
|
||||
"#73c0de",
|
||||
"#3ba272",
|
||||
"#fc8452",
|
||||
"#9a60b4",
|
||||
"#ea7ccc",
|
||||
"#5470c6",
|
||||
"#91cc75",
|
||||
"#fac858",
|
||||
"#ee6666",
|
||||
"#73c0de",
|
||||
"#3ba272",
|
||||
"#fc8452",
|
||||
"#9a60b4",
|
||||
"#ea7ccc"
|
||||
)
|
||||
) :
|
||||
BaseExpandableListAdapter() {
|
||||
override fun getGroupCount(): Int {
|
||||
return gData.size
|
||||
}
|
||||
|
||||
override fun getChildrenCount(groupPosition: Int): Int {
|
||||
return iData[groupPosition].count()
|
||||
}
|
||||
|
||||
override fun getGroup(groupPosition: Int): String {
|
||||
return gData[groupPosition]
|
||||
}
|
||||
|
||||
override fun getChild(groupPosition: Int, childPosition: Int): String {
|
||||
return iData[groupPosition][childPosition]
|
||||
}
|
||||
|
||||
override fun getGroupId(groupPosition: Int): Long {
|
||||
return groupPosition.toLong()
|
||||
}
|
||||
|
||||
override fun getChildId(groupPosition: Int, childPosition: Int): Long {
|
||||
return childPosition.toLong()
|
||||
}
|
||||
|
||||
override fun hasStableIds(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
//取得用于显示给定分组的视图. 这个方法仅返回分组的视图对象
|
||||
override fun getGroupView(
|
||||
groupPosition: Int,
|
||||
isExpanded: Boolean,
|
||||
convertView: View?,
|
||||
parent: ViewGroup
|
||||
): View? {
|
||||
var convertView = convertView
|
||||
val groupHolder: ViewHolderGroup
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(mContext).inflate(
|
||||
R.layout.item_exlist_group, parent, false
|
||||
)
|
||||
groupHolder = ViewHolderGroup()
|
||||
groupHolder.tv_group_name = convertView.findViewById<View>(R.id.tv_group_name) as TextView
|
||||
convertView.tag = groupHolder
|
||||
} else {
|
||||
groupHolder = convertView.tag as ViewHolderGroup
|
||||
}
|
||||
groupHolder.tv_group_name!!.text = gData[groupPosition]
|
||||
return convertView
|
||||
}
|
||||
|
||||
//取得显示给定分组给定子位置的数据用的视图
|
||||
override fun getChildView(
|
||||
groupPosition: Int,
|
||||
childPosition: Int,
|
||||
isLastChild: Boolean,
|
||||
convertView: View?,
|
||||
parent: ViewGroup
|
||||
): View? {
|
||||
var convertView = convertView
|
||||
val itemHolder: ViewHolderItem
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(mContext).inflate(
|
||||
R.layout.item_exlist_item, parent, false
|
||||
)
|
||||
itemHolder = ViewHolderItem()
|
||||
itemHolder.tv_color_dot = convertView.findViewById<View>(R.id.tv_color_dot) as TextView
|
||||
itemHolder.tv_name = convertView.findViewById<View>(R.id.tv_name) as TextView
|
||||
convertView.tag = itemHolder
|
||||
} else {
|
||||
itemHolder =
|
||||
convertView.tag as ViewHolderItem
|
||||
}
|
||||
val colorStr = colorsArr[groupPosition]
|
||||
itemHolder.tv_color_dot?.setTextColor(Color.parseColor(colorStr))
|
||||
itemHolder.tv_name?.text = iData[groupPosition][childPosition]
|
||||
return convertView
|
||||
}
|
||||
|
||||
//设置子列表是否可选中
|
||||
override fun isChildSelectable(groupPosition: Int, childPosition: Int): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
private class ViewHolderGroup {
|
||||
var tv_group_name: TextView? = null
|
||||
}
|
||||
|
||||
private class ViewHolderItem {
|
||||
var tv_color_dot: TextView? = null
|
||||
var tv_name: TextView? = null
|
||||
}
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.basiccontent
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartModel
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
import com.github.aachartmodel.aainfographics.demo.R
|
||||
import com.github.aachartmodel.aainfographics.demo.chartcomposer.SpecialChartComposer
|
||||
|
||||
class SpecialChartActivity : AppCompatActivity() {
|
||||
|
||||
private var aaChartModel: AAChartModel? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_special_chart)
|
||||
|
||||
val intent = intent
|
||||
val chartType = intent.getStringExtra("chartType")
|
||||
|
||||
aaChartModel = configureChartModelWithChartType(chartType!!)
|
||||
val aaChartView: AAChartView = findViewById(R.id.AAChartView)
|
||||
aaChartView.aa_drawChartWithChartModel(aaChartModel!!)
|
||||
}
|
||||
|
||||
private fun configureChartModelWithChartType(chartType: String): AAChartModel? {
|
||||
when (chartType) {
|
||||
AAChartType.Column.value -> return SpecialChartComposer.configurePolarColumnChart()
|
||||
AAChartType.Bar.value -> return SpecialChartComposer.configurePolarBarChart()
|
||||
AAChartType.Line.value -> return SpecialChartComposer.configurePolarLineChart()
|
||||
AAChartType.Area.value -> return SpecialChartComposer.configurePolarAreaChart()
|
||||
AAChartType.Pie.value -> return SpecialChartComposer.configurePieChart()
|
||||
AAChartType.Bubble.value -> return SpecialChartComposer.configureBubbleChart()
|
||||
AAChartType.Scatter.value -> return SpecialChartComposer.configureScatterChart()
|
||||
AAChartType.Arearange.value -> return SpecialChartComposer.configureArearangeChart()
|
||||
AAChartType.Areasplinerange.value -> return SpecialChartComposer.configureAreasplinerangeChart()
|
||||
AAChartType.Columnrange.value -> return SpecialChartComposer.configureColumnrangeChart()
|
||||
AAChartType.Spline.value -> return SpecialChartComposer.configureStepLineChart()
|
||||
AAChartType.Areaspline.value -> return SpecialChartComposer.configureStepAreaChart()
|
||||
AAChartType.Boxplot.value -> return SpecialChartComposer.configureBoxplotChart()
|
||||
AAChartType.Waterfall.value -> return SpecialChartComposer.configureWaterfallChart()
|
||||
AAChartType.Pyramid.value -> return SpecialChartComposer.configurePyramidChart()
|
||||
AAChartType.Funnel.value -> return SpecialChartComposer.configureFunnelChart()
|
||||
AAChartType.Errorbar.value -> return SpecialChartComposer.configureErrorbarChart()
|
||||
AAChartType.Gauge.value -> return SpecialChartComposer.configureGaugeChart()
|
||||
AAChartType.Polygon.value -> return SpecialChartComposer.configurePolygonChart()
|
||||
}
|
||||
|
||||
return SpecialChartComposer.configurePolarColumnChart()
|
||||
}
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.chartcomposer
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartSymbolType
|
||||
|
||||
val predefinedSymbol1 = AAChartSymbolType.Triangle.value
|
||||
val predefinedSymbol2 = AAChartSymbolType.Circle.value
|
||||
val imageSymbol = "url(https://www.highcharts.com/samples/graphics/sun.png)"
|
||||
val base64Symbol =
|
||||
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5Si +ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVi +pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+ 1dT1gvWd+ 1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx+ 1/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb+ 16EHTh0kX/i +c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAVVJREFUeNpi/P37NwOxYM2pHtm7lw8uYmBgYGAiVtPC3RWh+88vuneT474Dv4DkcUZibJy8PG72le/nkn+zMzAaMhnNyY1clMpCjKbz/86lMLAzMMA0MTAwMOC1Ea6JgYFB9pPwncbMg6owOaY1p3pk15zqkcWnie8j63ddY18nZHmWI2eW3vzN/Jf168c3UfGuHathAXHl+7lkBnYGBtafDP8NVd3jQ8xKHiNrZMyeqPPtE/9vTgYGBgb1H4oHlHXt43ZfWfDwNzsDIwMDA4POX831RXGrg9BdxLhob63VgTurjsAUsv5k+A9jC3/g/NCdfVoQm/+ZIu3qjhnyW3XABJANMNL19cYVcPBQrZpq9eyFwCdJmIT6D8UD5cmbHXFphKccI9Mgc84vTH9goYhPE4rGELOSx0bSjsUMDAwMunJ2FQST0+/fv1Hw5BWJbehi2DBgAHTKsWmiz+rJAAAAAElFTkSuQmCC)"
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.chartcomposer
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartAnimationType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartModel
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartSymbolStyleType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartSymbolType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.AASeriesElement
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAGradientColor
|
||||
import com.github.aachartmodel.aainfographics.aatools.AALinearGradientDirection
|
||||
|
||||
object BasicChartComposer {
|
||||
|
||||
private fun configureBasicOptions(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.backgroundColor("#4b2b7f")
|
||||
.dataLabelsEnabled(false)
|
||||
.yAxisGridLineWidth(0)
|
||||
.touchEventEnabled(true)
|
||||
}
|
||||
|
||||
fun configureAreaChart(): AAChartModel {
|
||||
val element1: AASeriesElement = AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.data(arrayOf<Any>(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6))
|
||||
val element2: AASeriesElement = AASeriesElement()
|
||||
.name("NewYork")
|
||||
.data(arrayOf<Any>(0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5))
|
||||
val element3: AASeriesElement = AASeriesElement()
|
||||
.name("London")
|
||||
.data(arrayOf<Any>(0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0))
|
||||
val element4: AASeriesElement = AASeriesElement()
|
||||
.name("Berlin")
|
||||
.data(arrayOf<Any>(3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8))
|
||||
return configureBasicOptions()
|
||||
.chartType(AAChartType.Area)
|
||||
.categories(arrayOf("Java","Swift","Python","Ruby", "PHP","Go","C","C#","C++"))
|
||||
.series(arrayOf(element1, element2, element3, element4))
|
||||
}
|
||||
|
||||
fun configureStepAreaChartAndStepLineChart(): AAChartModel {
|
||||
val element1 = AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.step(true)
|
||||
.data(arrayOf(149.9, 171.5, 106.4, 129.2, 144.0, 176.0, 135.6, 188.5, 276.4, 214.1, 95.6, 54.4))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("NewYork")
|
||||
.step(true)
|
||||
.data(arrayOf(83.6, 78.8, 188.5, 93.4, 106.0, 84.5, 105.0, 104.3, 131.2, 153.5, 226.6, 192.3))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("London")
|
||||
.step(true)
|
||||
.data(arrayOf(48.9, 38.8, 19.3, 41.4, 47.0, 28.3, 59.0, 69.6, 52.4, 65.2, 53.3, 72.2))
|
||||
|
||||
return configureBasicOptions()
|
||||
.chartType(AAChartType.Area)
|
||||
.series(arrayOf(element1, element2, element3))
|
||||
}
|
||||
|
||||
fun configureColumnChartAndBarChart(): AAChartModel {
|
||||
return configureAreaChart()
|
||||
.categories(arrayOf(
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
|
||||
.legendEnabled(true)
|
||||
.colorsTheme(arrayOf("#fe117c", "#ffc069", "#06caf4", "#7dffc0"))
|
||||
.animationType(AAChartAnimationType.EaseOutCubic)
|
||||
.animationDuration(1200)
|
||||
}
|
||||
|
||||
fun configureAreaChartAndAreasplineChartStyle(chartType: String): AAChartModel {
|
||||
val aaChartModel: AAChartModel = configureAreaChart()
|
||||
.animationType(AAChartAnimationType.EaseOutQuart)
|
||||
.legendEnabled(true)
|
||||
.markerRadius(6)
|
||||
.markerSymbol(AAChartSymbolType.Circle)
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
|
||||
if (chartType == AAChartType.Areaspline.value) {
|
||||
val gradientColorDic: Map<String, Any> = AAGradientColor.linearGradient(
|
||||
AALinearGradientDirection.ToBottomRight,
|
||||
"rgba(138,43,226,1)",
|
||||
"rgba(30,144,255,1)" //颜色字符串设置支持十六进制类型和 rgba 类型
|
||||
)
|
||||
val element1 = AASeriesElement()
|
||||
.name("Predefined symbol")
|
||||
.data(arrayOf(0.45, 0.43, 0.50, 0.55, 0.58, 0.62, 0.83, 0.39, 0.56, 0.67, 0.50, 0.34, 0.50, 0.67, 0.58, 0.29, 0.46, 0.23, 0.47, 0.46, 0.38, 0.56, 0.48, 0.36))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("Image symbol")
|
||||
.data(arrayOf(0.38, 0.31, 0.32, 0.32, 0.64, 0.66, 0.86, 0.47, 0.52, 0.75, 0.52, 0.56, 0.54, 0.60, 0.46, 0.63, 0.54, 0.51, 0.58, 0.64, 0.60, 0.45, 0.36, 0.67))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("Base64 symbol (*)")
|
||||
.data(arrayOf(0.46, 0.32, 0.53, 0.58, 0.86, 0.68, 0.85, 0.73, 0.69, 0.71, 0.91, 0.74, 0.60, 0.50, 0.39, 0.67, 0.55, 0.49, 0.65, 0.45, 0.64, 0.47, 0.63, 0.64))
|
||||
|
||||
val element4 = AASeriesElement()
|
||||
.name("Custom symbol")
|
||||
.data(arrayOf(0.60, 0.51, 0.52, 0.53, 0.64, 0.84, 0.65, 0.68, 0.63, 0.47, 0.72, 0.60, 0.65, 0.74, 0.66, 0.65, 0.71, 0.59, 0.65, 0.77, 0.52, 0.53, 0.58, 0.53))
|
||||
|
||||
aaChartModel
|
||||
.animationType(AAChartAnimationType.EaseFrom) //设置图表渲染动画类型为 EaseFrom
|
||||
.series(arrayOf(element1, element2, element3, element4))
|
||||
}
|
||||
return aaChartModel
|
||||
}
|
||||
|
||||
|
||||
fun configureLineChartAndSplineChartStyle(chartType: String): AAChartModel {
|
||||
val aaChartModel: AAChartModel = configureAreaChart()
|
||||
// .chartType(chartType)
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.BorderBlank) //设置折线连接点样式为:边缘白色
|
||||
.markerRadius(6)
|
||||
if (chartType == AAChartType.Spline.value) {
|
||||
val element1: AASeriesElement = AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.lineWidth(7)
|
||||
.data(arrayOf<Any>(50, 320, 230, 370, 230, 400))
|
||||
val element2: AASeriesElement = AASeriesElement()
|
||||
.name("Berlin")
|
||||
.lineWidth(7)
|
||||
.data(arrayOf<Any>(80, 390, 210, 340, 240, 350))
|
||||
val element3: AASeriesElement = AASeriesElement()
|
||||
.name("New York")
|
||||
.lineWidth(7)
|
||||
.data(arrayOf<Any>(100, 370, 180, 280, 260, 300))
|
||||
val element4: AASeriesElement = AASeriesElement()
|
||||
.name("London")
|
||||
.lineWidth(7)
|
||||
.data(arrayOf<Any>(130, 350, 160, 310, 250, 268))
|
||||
aaChartModel
|
||||
.animationType(AAChartAnimationType.SwingFromTo)
|
||||
.series(arrayOf(element1, element2, element3, element4))
|
||||
}
|
||||
return aaChartModel
|
||||
}
|
||||
}
|
||||
+1322
File diff suppressed because it is too large
Load Diff
+1988
File diff suppressed because it is too large
Load Diff
+758
@@ -0,0 +1,758 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.chartcomposer
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.*
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAColor
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAGradientColor
|
||||
import com.github.aachartmodel.aainfographics.aatools.AALinearGradientDirection
|
||||
import com.github.aachartmodel.aainfographics.aatools.AARgba
|
||||
|
||||
object JSFunctionForAAAxisComposer {
|
||||
fun customYAxisLabels(): AAOptions {
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Line)//图形类型
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.BorderBlank)//折线连接点样式为外边缘空白
|
||||
.dataLabelsEnabled(false)
|
||||
.colorsTheme(arrayOf("#04d69f", "#1e90ff", "#ef476f", "#ffd066"))
|
||||
.stacking(AAChartStackingType.Normal)
|
||||
.markerRadius(8)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Tokyo Hot")
|
||||
.lineWidth(5.0)
|
||||
.fillOpacity(0.4f)
|
||||
.data(arrayOf(29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4))))
|
||||
|
||||
val aaYAxisLabels = AALabels()
|
||||
.formatter("""
|
||||
function () {
|
||||
var yValue = this.value;
|
||||
if (yValue >= 200) {
|
||||
return "极佳";
|
||||
} else if (yValue >= 150 && yValue < 200) {
|
||||
return "非常棒";
|
||||
} else if (yValue >= 100 && yValue < 150) {
|
||||
return "相当棒";
|
||||
} else if (yValue >= 50 && yValue < 100) {
|
||||
return "还不错";
|
||||
} else {
|
||||
return "一般";
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.yAxis?.labels(aaYAxisLabels)
|
||||
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
fun customYAxisLabels2(): AAOptions {
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Line)//图形类型
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.BorderBlank)//折线连接点样式为外边缘空白
|
||||
.dataLabelsEnabled(false)
|
||||
.colorsTheme(arrayOf("#04d69f", "#1e90ff", "#ef476f", "#ffd066"))
|
||||
.stacking(AAChartStackingType.Normal)
|
||||
.markerRadius(8)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Tokyo Hot")
|
||||
.lineWidth(5.0)
|
||||
.fillOpacity(0.4f)
|
||||
.data(arrayOf(229.9, 771.5, 1106.4, 1129.2, 6644.0, 1176.0, 8835.6, 148.5, 8816.4, 6694.1, 7795.6, 9954.4))))
|
||||
|
||||
val aaYAxisLabels = AALabels()
|
||||
.style(
|
||||
AAStyle()
|
||||
.fontSize(10)
|
||||
.fontWeight(AAChartFontWeightType.Bold)
|
||||
.color(AAColor.Gray))
|
||||
.formatter("""
|
||||
function () {
|
||||
var yValue = this.value;
|
||||
if (yValue == 0) {
|
||||
return "0";
|
||||
} else if (yValue == 2500) {
|
||||
return "25%";
|
||||
} else if (yValue == 5000) {
|
||||
return "50%";
|
||||
} else if (yValue == 7500) {
|
||||
return "75%";
|
||||
} else if (yValue == 10000) {
|
||||
return "100%";
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.yAxis?.apply {
|
||||
opposite(true)
|
||||
.tickWidth(2)
|
||||
.lineWidth(1.5)//Y轴轴线颜色
|
||||
.lineColor(AAColor.LightGray)//Y轴轴线颜色
|
||||
.gridLineWidth(0)//Y轴网格线宽度
|
||||
.tickPositions(arrayOf(0, 2500, 5000, 7500, 10000))
|
||||
.labels(aaYAxisLabels)
|
||||
}
|
||||
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
//Stupid method
|
||||
fun customAreaChartXAxisLabelsTextUnitSuffix1(): AAOptions {
|
||||
val gradientColorDic1 = AAGradientColor.linearGradient(
|
||||
AALinearGradientDirection.ToTop,
|
||||
"#7052f4",
|
||||
"#00b0ff"
|
||||
)
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Area)
|
||||
.title("Custom X Axis Labels Text")
|
||||
.subtitle("By Using JavaScript Formatter Function")
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.BorderBlank)
|
||||
.yAxisGridLineWidth(0)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.lineWidth(1.5)
|
||||
.color("#00b0ff")
|
||||
.fillColor(gradientColorDic1)
|
||||
.name("2018")
|
||||
.data(arrayOf(
|
||||
1.51, 6.7, 0.94, 1.44, 1.6, 1.63, 1.56, 1.91, 2.45, 3.87, 3.24, 4.90, 4.61, 4.10,
|
||||
4.17, 3.85, 4.17, 3.46, 3.46, 3.55, 3.50, 4.13, 2.58, 2.28, 1.51, 12.7, 0.94, 1.44,
|
||||
18.6, 1.63, 1.56, 1.91, 2.45, 3.87, 3.24, 4.90, 4.61, 4.10, 4.17, 3.85, 4.17, 3.46,
|
||||
3.46, 3.55, 3.50, 4.13, 2.58, 2.28, 1.33, 4.68, 1.31, 1.10, 13.9, 1.10, 1.16, 1.67,
|
||||
2.64, 2.86, 3.00, 3.21, 4.14, 4.07, 3.68, 3.11, 3.41, 3, 3.32, 3.07, 3.92, 3.05,
|
||||
2.18, 3.24, 3.23, 3.15, 2.90, 1.81, 2.11, 2.43, 5.59, 3.09, 4.09, 6.14, 5.33, 6.05,
|
||||
5.71, 6.22, 6.56, 4.75, 5.27, 6.02, 5.48,
|
||||
))))
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.xAxis?.labels
|
||||
?.formatter(
|
||||
"function () {" +
|
||||
"const xValue = this.value;" +
|
||||
"if (xValue%10 == 0) {" +
|
||||
"return xValue + \" sec\";" +
|
||||
"} else {" +
|
||||
"return \"\";" +
|
||||
"}" +
|
||||
"}"
|
||||
)
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
//Smart method
|
||||
fun customAreaChartXAxisLabelsTextUnitSuffix2(): AAOptions {
|
||||
val aaOptions = customAreaChartXAxisLabelsTextUnitSuffix1()
|
||||
aaOptions.xAxis?.labels?.apply {
|
||||
step(10)
|
||||
.format("{value} sec")
|
||||
}
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
//https://github.com/AAChartModel/AAChartKit/issues/901
|
||||
//https://github.com/AAChartModel/AAChartKit/issues/952
|
||||
fun configureTheAxesLabelsFormattersOfDoubleYAxesChart(): AAOptions {
|
||||
val aaChart = AAChart()
|
||||
.backgroundColor(AAColor.White)
|
||||
val aaTitle = AATitle()
|
||||
.text("")
|
||||
val aaXAxis = AAXAxis()
|
||||
.visible(true)
|
||||
.min(0)
|
||||
.categories(arrayOf(
|
||||
"Java", "Swift", "Python", "Ruby", "PHP", "Go", "C",
|
||||
"C#", "C++", "Perl", "R", "MATLAB", "SQL"
|
||||
))
|
||||
val aaPlotOptions = AAPlotOptions()
|
||||
.series(
|
||||
AASeries()
|
||||
.marker(
|
||||
AAMarker()
|
||||
.radius(7) //曲线连接点半径,默认是4
|
||||
.symbol(AAChartSymbolType.Circle.value) //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
||||
.fillColor(AAColor.White) //点的填充色(用来设置折线连接点的填充色)
|
||||
.lineWidth(3) //外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
||||
.lineColor("") //外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
|
||||
))
|
||||
val yAxis1 = AAYAxis()
|
||||
.visible(true)
|
||||
.lineWidth(1)
|
||||
.tickPositions(arrayOf(0, 50, 100, 150, 200))
|
||||
.labels(AALabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color("DodgerBlue"))
|
||||
.formatter("""function () {
|
||||
let yValue = this.value;
|
||||
if (yValue >= 200) {
|
||||
return "极佳";
|
||||
} else if (yValue >= 150 && yValue < 200) {
|
||||
return "非常棒";
|
||||
} else if (yValue >= 100 && yValue < 150) {
|
||||
return "相当棒";
|
||||
} else if (yValue >= 50 && yValue < 100) {
|
||||
return "还不错";
|
||||
} else {
|
||||
return "一般";
|
||||
}
|
||||
}"""))
|
||||
.gridLineWidth(0)
|
||||
.title(
|
||||
AATitle()
|
||||
.text("中文")
|
||||
.style(AAStyle.style("DodgerBlue", 14, AAChartFontWeightType.Bold)))
|
||||
val yAxis2 = AAYAxis()
|
||||
.visible(true)
|
||||
.lineWidth(1)
|
||||
.tickPositions(arrayOf(0, 50, 100, 150, 200))
|
||||
.labels(AALabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color(AAColor.Red))
|
||||
.formatter("""function () {
|
||||
let yValue = this.value;
|
||||
if (yValue >= 200) {
|
||||
return "Awesome";
|
||||
} else if (yValue >= 150 && yValue < 200) {
|
||||
return "Great";
|
||||
} else if (yValue >= 100 && yValue < 150) {
|
||||
return "Very Good";
|
||||
} else if (yValue >= 50 && yValue < 100) {
|
||||
return "Not Bad";
|
||||
} else {
|
||||
return "Just So So";
|
||||
}
|
||||
}"""))
|
||||
.gridLineWidth(0)
|
||||
.title(
|
||||
AATitle()
|
||||
.text("ENGLISH")
|
||||
.style(AAStyle.style(AAColor.Red, 14, AAChartFontWeightType.Bold)))
|
||||
.opposite(true)
|
||||
val aaTooltip = AATooltip()
|
||||
.enabled(true)
|
||||
.shared(true)
|
||||
val seriesArr: Array<Any> = arrayOf(
|
||||
AASeriesElement()
|
||||
.name("2020")
|
||||
.type(AAChartType.Spline)
|
||||
.lineWidth(7)
|
||||
.color(AAGradientColor.DeepSea)
|
||||
.borderRadius(4)
|
||||
.yAxis(1)
|
||||
.data(arrayOf(
|
||||
0, 71.5, 106.4, 129.2, 144.0, 176.0,
|
||||
135.6, 148.5, 216.4, 194.1, 95.6, 54.4
|
||||
)),
|
||||
AASeriesElement()
|
||||
.name("2021")
|
||||
.type(AAChartType.Spline)
|
||||
.lineWidth(7)
|
||||
.color(AAGradientColor.Sanguine)
|
||||
.yAxis(0)
|
||||
.data(arrayOf(
|
||||
135.6, 148.5, 216.4, 194.1, 95.6, 54.4,
|
||||
0, 71.5, 106.4, 129.2, 144.0, 176.0
|
||||
)))
|
||||
return AAOptions()
|
||||
.chart(aaChart)
|
||||
.title(aaTitle)
|
||||
.plotOptions(aaPlotOptions)
|
||||
.xAxis(aaXAxis)
|
||||
.yAxisArray(arrayOf(yAxis1, yAxis2))
|
||||
.tooltip(aaTooltip)
|
||||
.series(seriesArr)
|
||||
}
|
||||
|
||||
//https://github.com/AAChartModel/AAChartKit/issues/1324
|
||||
fun configureTheAxesLabelsFormattersOfDoubleYAxesChart2(): AAOptions {
|
||||
val aaChart = AAChart()
|
||||
.backgroundColor(AAColor.White)
|
||||
val aaTitle = AATitle()
|
||||
.text("")
|
||||
val aaXAxis = AAXAxis()
|
||||
.visible(true)
|
||||
.min(0)
|
||||
.categories(arrayOf(
|
||||
"Java", "Swift", "Python", "Ruby", "PHP", "Go", "C",
|
||||
"C#", "C++", "Perl", "R", "MATLAB", "SQL"))
|
||||
val aaPlotOptions = AAPlotOptions()
|
||||
.series(
|
||||
AASeries()
|
||||
.marker(
|
||||
AAMarker()
|
||||
.radius(7) //曲线连接点半径,默认是4
|
||||
.symbol(AAChartSymbolType.Circle.value) //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
||||
.fillColor(AAColor.White) //点的填充色(用来设置折线连接点的填充色)
|
||||
.lineWidth(3) //外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
||||
.lineColor("") //外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
|
||||
))
|
||||
val yAxis1 = AAYAxis()
|
||||
.visible(true)
|
||||
.lineWidth(1)
|
||||
.tickPositions(arrayOf(0, 50, 100, 150, 200))
|
||||
.labels(AALabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color("DodgerBlue"))
|
||||
.formatter("""function () {
|
||||
var yValue = this.value;
|
||||
var formattedYValue = (yValue / 1000).toFixed(3) + '千';
|
||||
return formattedYValue;
|
||||
}"""
|
||||
))
|
||||
.gridLineWidth(0)
|
||||
.title(
|
||||
AATitle()
|
||||
.text("以「千」为单位")
|
||||
.style(AAStyle.style("DodgerBlue", 14, AAChartFontWeightType.Bold)))
|
||||
val yAxis2 = AAYAxis()
|
||||
.visible(true)
|
||||
.lineWidth(1)
|
||||
.tickPositions(arrayOf(0, 50, 100, 150, 200))
|
||||
.labels(AALabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color(AAColor.Red))
|
||||
.formatter("""function () {
|
||||
var yValue = this.value;
|
||||
var formattedYValue = (yValue / 10000).toFixed(4) + '万';
|
||||
return formattedYValue;
|
||||
}"""
|
||||
))
|
||||
.gridLineWidth(0)
|
||||
.title(
|
||||
AATitle()
|
||||
.text("以『万』为单位")
|
||||
.style(AAStyle.style(AAColor.Red, 14, AAChartFontWeightType.Bold)))
|
||||
.opposite(true)
|
||||
val aaTooltip = AATooltip()
|
||||
.enabled(true)
|
||||
.shared(true)
|
||||
val seriesArr: Array<Any> = arrayOf(
|
||||
AASeriesElement()
|
||||
.name("2020")
|
||||
.type(AAChartType.Spline)
|
||||
.lineWidth(7)
|
||||
.color(AAGradientColor.DeepSea)
|
||||
.borderRadius(4)
|
||||
.yAxis(1)
|
||||
.data(arrayOf(
|
||||
0, 71.5, 106.4, 129.2, 144.0, 176.0,
|
||||
135.6, 148.5, 216.4, 194.1, 95.6, 54.4)),
|
||||
AASeriesElement()
|
||||
.name("2021")
|
||||
.type(AAChartType.Spline)
|
||||
.lineWidth(7)
|
||||
.color(AAGradientColor.Sanguine)
|
||||
.yAxis(0)
|
||||
.data(arrayOf(
|
||||
135.6, 148.5, 216.4, 194.1, 95.6, 54.4,
|
||||
0, 71.5, 106.4, 129.2, 144.0, 176.0
|
||||
)))
|
||||
return AAOptions()
|
||||
.chart(aaChart)
|
||||
.title(aaTitle)
|
||||
.plotOptions(aaPlotOptions)
|
||||
.xAxis(aaXAxis)
|
||||
.yAxisArray(arrayOf(yAxis1, yAxis2))
|
||||
.tooltip(aaTooltip)
|
||||
.series(seriesArr)
|
||||
}
|
||||
|
||||
//https://github.com/AAChartModel/AAChartKit/issues/1324
|
||||
//https://github.com/AAChartModel/AAChartKit/issues/1330
|
||||
fun configureTheAxesLabelsFormattersOfDoubleYAxesChart3(): AAOptions {
|
||||
val aaChart = AAChart()
|
||||
.backgroundColor(AAColor.White)
|
||||
val aaTitle = AATitle()
|
||||
.text("")
|
||||
val aaXAxis = AAXAxis()
|
||||
.visible(true)
|
||||
.min(0)
|
||||
.categories(arrayOf(
|
||||
"Java", "Swift", "Python", "Ruby", "PHP", "Go", "C",
|
||||
"C#", "C++", "Perl", "R", "MATLAB", "SQL"
|
||||
))
|
||||
val aaPlotOptions = AAPlotOptions()
|
||||
.series(
|
||||
AASeries()
|
||||
.marker(
|
||||
AAMarker()
|
||||
.radius(7) //曲线连接点半径,默认是4
|
||||
.symbol(AAChartSymbolType.Circle.value) //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
|
||||
.fillColor(AAColor.White) //点的填充色(用来设置折线连接点的填充色)
|
||||
.lineWidth(3) //外沿线的宽度(用来设置折线连接点的轮廓描边的宽度)
|
||||
.lineColor("") //外沿线的颜色(用来设置折线连接点的轮廓描边颜色,当值为空字符串时,默认取数据点或数据列的颜色)
|
||||
))
|
||||
val yAxis1 = AAYAxis()
|
||||
.visible(true)
|
||||
.lineWidth(1)
|
||||
.tickPositions(arrayOf(0, 50, 100, 150, 200))
|
||||
.labels(AALabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color("DodgerBlue"))
|
||||
.formatter("""function () {
|
||||
var yValue = this.value;
|
||||
var unitStr = "千";
|
||||
if (yValue == 0) {
|
||||
unitStr = "";
|
||||
}
|
||||
var formattedYValue = (yValue / 1000).toFixed(3) + unitStr;
|
||||
return formattedYValue;
|
||||
}""")) //Y轴文字数值为 0 的时候, 不显示单位
|
||||
.gridLineWidth(0)
|
||||
.title(
|
||||
AATitle()
|
||||
.text("以「千」为单位")
|
||||
.style(AAStyle.style("DodgerBlue", 14, AAChartFontWeightType.Bold)))
|
||||
val yAxis2 = AAYAxis()
|
||||
.visible(true)
|
||||
.lineWidth(1)
|
||||
.tickPositions(arrayOf(0, 50, 100, 150, 200))
|
||||
.labels(AALabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color(AAColor.Red))
|
||||
.formatter("""function () {
|
||||
var yValue = this.value;
|
||||
var unitStr = "万";
|
||||
if (yValue == 0) {
|
||||
unitStr = "";
|
||||
}
|
||||
var formattedYValue = (yValue / 10000).toFixed(4) + unitStr;
|
||||
return formattedYValue;
|
||||
}""")) //Y轴文字数值为 0 的时候, 不显示单位
|
||||
.gridLineWidth(0)
|
||||
.title(
|
||||
AATitle()
|
||||
.text("以『万』为单位")
|
||||
.style(AAStyle.style(AAColor.Red, 14, AAChartFontWeightType.Bold)))
|
||||
.opposite(true)
|
||||
val aaTooltip = AATooltip()
|
||||
.enabled(true)
|
||||
.shared(true)
|
||||
val seriesArr: Array<Any> = arrayOf(
|
||||
AASeriesElement()
|
||||
.name("2020")
|
||||
.type(AAChartType.Spline)
|
||||
.lineWidth(7)
|
||||
.color(AAGradientColor.DeepSea)
|
||||
.borderRadius(4)
|
||||
.yAxis(1)
|
||||
.data(arrayOf(
|
||||
0, 71.5, 106.4, 129.2, 144.0, 176.0,
|
||||
135.6, 148.5, 216.4, 194.1, 95.6, 54.4)),
|
||||
AASeriesElement()
|
||||
.name("2021")
|
||||
.type(AAChartType.Spline)
|
||||
.lineWidth(7)
|
||||
.color(AAGradientColor.Sanguine)
|
||||
.yAxis(0)
|
||||
.data(arrayOf(
|
||||
135.6, 148.5, 216.4, 194.1, 95.6, 54.4,
|
||||
0, 71.5, 106.4, 129.2, 144.0, 176.0)))
|
||||
return AAOptions()
|
||||
.chart(aaChart)
|
||||
.title(aaTitle)
|
||||
.plotOptions(aaPlotOptions)
|
||||
.xAxis(aaXAxis)
|
||||
.yAxisArray(arrayOf(yAxis1, yAxis2))
|
||||
.tooltip(aaTooltip)
|
||||
.series(seriesArr)
|
||||
}
|
||||
|
||||
//https://github.com/AAChartModel/AAChartKit/issues/1217
|
||||
fun customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters(): AAOptions {
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Bar) //图表类型
|
||||
.title("春江花月夜") //图表主标题
|
||||
.subtitle("张若虚") //图表副标题
|
||||
// .yAxisGridLineStyle([AALineStyle styleWithWidth:0})//y轴横向分割线宽度(为0即是隐藏分割线)
|
||||
.xAxisReversed(true) // .xAxisLabelsStyle(AAStyle.style(AAColor.Black))
|
||||
.legendEnabled(false)
|
||||
.categories(arrayOf(
|
||||
"春江潮水连海平", "海上明月共潮生",
|
||||
"滟滟随波千万里", "何处春江无月明",
|
||||
"江流宛转绕芳甸", "月照花林皆似霰",
|
||||
"空里流霜不觉飞", "汀上白沙看不见",
|
||||
"江天一色无纤尘", "皎皎空中孤月轮",
|
||||
"江畔何人初见月", "江月何年初照人",
|
||||
"人生代代无穷已", "江月年年望相似",
|
||||
"不知江月待何人", "但见长江送流水",
|
||||
"白云一片去悠悠", "青枫浦上不胜愁",
|
||||
"谁家今夜扁舟子", "何处相思明月楼",
|
||||
"可怜楼上月裴回", "应照离人妆镜台",
|
||||
"玉户帘中卷不去", "捣衣砧上拂还来",
|
||||
"此时相望不相闻", "愿逐月华流照君",
|
||||
"鸿雁长飞光不度", "鱼龙潜跃水成文",
|
||||
"昨夜闲潭梦落花", "可怜春半不还家",
|
||||
"江水流春去欲尽", "江潭落月复西斜",
|
||||
"斜月沉沉藏海雾", "碣石潇湘无限路",
|
||||
"不知乘月几人归", "落月摇情满江树"))
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.lineWidth(1.5)
|
||||
.color(AAGradientColor.DeepSea)
|
||||
.name("2018")
|
||||
.data(arrayOf(
|
||||
1.51, 3.7, 0.94, 1.44, 1.6, 1.63, 1.56, 1.91, 2.45, 3.87, 3.24, 4.90, 4.61, 4.10,
|
||||
4.17, 3.85, 4.17, 3.46, 3.46, 3.55, 3.50, 4.13, 2.58, 2.28,1.51, 2.7, 0.94, 1.44,
|
||||
3.6, 1.63, 1.56, 1.91, 2.45, 3.87, 3.24, 4.90,))))
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.xAxis?.labels
|
||||
?.formatter("function () {\n" +
|
||||
" let xAxisCategory = this.value;\n" +
|
||||
" if (xAxisCategory.length > 4) {\n" +
|
||||
" return xAxisCategory.substr(0, 4);\n" +
|
||||
" } else {\n" +
|
||||
" return xAxisCategory;\n" +
|
||||
" }\n" +
|
||||
" }")
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
//https://github.com/AAChartModel/AAChartKit/issues/852 自定义蜘蛛🕷图样式
|
||||
fun customSpiderChartStyle(): AAOptions {
|
||||
val categoryArr = arrayOf(
|
||||
"周转天数(天)",
|
||||
"订单满足率",
|
||||
"订单履约时效",
|
||||
"动销率",
|
||||
"畅销商品缺货率",
|
||||
"高库存金额占比",
|
||||
"不动销金额占比",
|
||||
"停采金额占比"
|
||||
)
|
||||
|
||||
// String categoryJSArrStr = {categoryArr aa_toJSArray];
|
||||
|
||||
//
|
||||
// String xAxisLabelsFormatter ={String stringWithFormat:(AAJSFunc(function () {
|
||||
// return %[this.value];
|
||||
// })),categoryJSArrStr];
|
||||
val categoryJSArrStr = javaScriptArrayStringWithJavaArray(categoryArr)
|
||||
val xAxisLabelsFormatter = String.format(
|
||||
"function () {\n" +
|
||||
" return %s[this.value];\n" +
|
||||
" }", categoryJSArrStr
|
||||
)
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Line) //图表类型
|
||||
.title("健康体检表") //图表主标题
|
||||
.colorsTheme(arrayOf("#fe117c", "#ffc069")) //设置主体颜色数组
|
||||
.yAxisLineWidth(0) // .yAxisGridLineStyle([AALineStyle styleWithWidth:0})
|
||||
// .yAxisTickPositions([0, 5, 10, 15, 20, 25, 30, 35})
|
||||
.markerRadius(5)
|
||||
.markerSymbol(AAChartSymbolType.Circle)
|
||||
.polar(true)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("本月得分")
|
||||
.data(arrayOf(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5)),
|
||||
AASeriesElement()
|
||||
.name("上月得分")
|
||||
.data(arrayOf(0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1))))
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.chart?.apply {
|
||||
marginLeft(80)
|
||||
.marginRight(80)
|
||||
}
|
||||
aaOptions.xAxis?.apply {
|
||||
lineWidth(0) //避免多边形外环之外有额外套了一层无用的外环
|
||||
.labels?.style(AAStyle.style(AAColor.Black))
|
||||
?.formatter(xAxisLabelsFormatter)
|
||||
}
|
||||
aaOptions.yAxis?.apply {
|
||||
gridLineInterpolation("polygon") //设置蜘蛛网🕸图表的网线为多边形
|
||||
.labels?.style(AAStyle.style(AAColor.Black))
|
||||
}
|
||||
|
||||
|
||||
//设定图例项的CSS样式。只支持有关文本的CSS样式设定。
|
||||
// /默认是:{
|
||||
// "color": "#333333",
|
||||
// "cursor": "pointer",
|
||||
// "fontSize": "12px",
|
||||
// "fontWeight": "bold"
|
||||
// }
|
||||
// /
|
||||
val aaItemStyle = AAItemStyle()
|
||||
.color(AAColor.Gray) //字体颜色
|
||||
.cursor("pointer") //(在移动端这个属性没什么意义,其实不用设置)指定鼠标滑过数据列时鼠标的形状。当绑定了数据列点击事件时,可以将此参数设置为 "pointer",用来提醒用户改数据列是可以点击的。
|
||||
.fontSize(14) //字体大小
|
||||
.fontWeight(AAChartFontWeightType.Thin) //字体为细体字
|
||||
aaOptions.legend?.apply {
|
||||
enabled(true)
|
||||
.align(AAChartAlignType.Center) //设置图例位于水平方向上的右侧
|
||||
.layout(AAChartLayoutType.Horizontal) //设置图例排列方式为垂直排布
|
||||
.verticalAlign(AAChartVerticalAlignType.Top) //设置图例位于竖直方向上的顶部
|
||||
.itemStyle(aaItemStyle)
|
||||
}
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
// Refer to the issue https://github.com/AAChartModel/AAChartKit/issues/589
|
||||
fun customizeEveryDataLabelSinglelyByDataLabelsFormatter(): AAOptions {
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Areaspline) //图表类型
|
||||
.dataLabelsEnabled(true)
|
||||
.tooltipEnabled(false)
|
||||
.colorsTheme(arrayOf(AAGradientColor.FizzyPeach))
|
||||
.markerRadius(0)
|
||||
.legendEnabled(false)
|
||||
.categories(arrayOf(
|
||||
"美国🇺🇸",
|
||||
"欧洲🇪🇺",
|
||||
"中国🇨🇳",
|
||||
"日本🇯🇵",
|
||||
"韩国🇰🇷",
|
||||
"越南🇻🇳",
|
||||
"中国香港🇭🇰"))
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, 21.5, 5.2))))
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.yAxis?.gridLineDashStyle = AAChartLineDashStyleType.LongDash.value //设置Y轴的网格线样式为 AAChartLineDashStyleType.LongDash
|
||||
val unitArr = arrayOf("美元", "欧元", "人民币", "日元", "韩元", "越南盾", "港币")
|
||||
val unitJSArrStr: String =
|
||||
JSFunctionForAAOptionsComposer.javaScriptArrayStringWithJavaArray(unitArr)
|
||||
val dataLabelsFormatter = String.format(
|
||||
"function () {\n" +
|
||||
" return this.y + %s[this.point.index]; \n" + //单组 series 图表, 获取选中的点的索引是 this.point.index ,多组并且共享提示框,则是this.points[0].index
|
||||
" }", unitJSArrStr
|
||||
)
|
||||
val aaDatalabels = aaOptions.plotOptions?.series?.dataLabels
|
||||
aaDatalabels?.apply {
|
||||
style(AAStyle.style(AAColor.Red, 10, AAChartFontWeightType.Bold, "1px 1px contrast"))
|
||||
.formatter(dataLabelsFormatter)
|
||||
.backgroundColor(AAColor.White) // white color
|
||||
.borderColor(AAColor.Red) // red color
|
||||
.borderRadius(1.5)
|
||||
.borderWidth(1.3)
|
||||
.x(3).y(-20)
|
||||
.verticalAlign(AAChartVerticalAlignType.Middle)
|
||||
}
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
|
||||
// Refer to GitHub issue: https://github.com/AAChartModel/AAChartKit/issues/938
|
||||
// Refer to online chart sample: https://www.highcharts.com/demo/column-comparison
|
||||
fun customXAxisLabelsBeImages(): AAOptions {
|
||||
val nameArr: Array<String> = arrayOf(
|
||||
"South Korea",
|
||||
"Japan",
|
||||
"Australia",
|
||||
"Germany",
|
||||
"Russia",
|
||||
"China",
|
||||
"Great Britain",
|
||||
"United States"
|
||||
)
|
||||
val colorArr: Array<Any> = arrayOf(
|
||||
AARgba(201, 36, 39, 1f),
|
||||
AARgba(201, 36, 39, 1f),
|
||||
AARgba(0, 82, 180, 1f),
|
||||
AARgba(0, 0, 0, 1f),
|
||||
AARgba(240, 240, 240, 1f),
|
||||
AARgba(255, 217, 68, 1f),
|
||||
AARgba(0, 82, 180, 1f),
|
||||
AARgba(215, 0, 38, 1f)
|
||||
)
|
||||
val imageLinkFlagArr: Array<String> = arrayOf(
|
||||
"197582",
|
||||
"197604",
|
||||
"197507",
|
||||
"197571",
|
||||
"197408",
|
||||
"197375",
|
||||
"197374",
|
||||
"197484"
|
||||
)
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Column)
|
||||
.title("Custom X Axis Labels Be Images")
|
||||
.subtitle("use HTML")
|
||||
.categories(nameArr)
|
||||
.colorsTheme(colorArr)
|
||||
.borderRadius(5)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("AD 2020")
|
||||
.data(arrayOf(9.0, 9.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5))
|
||||
.colorByPoint(true)
|
||||
.borderRadiusTopLeft("50%")
|
||||
.borderRadiusTopRight("50%")))
|
||||
val imageLinkFlagJSArrStr: String = javaScriptArrayStringWithJavaArray(imageLinkFlagArr)
|
||||
val xLabelsFormatter = String.format(
|
||||
"function () {\n" +
|
||||
" let imageFlag = %s[this.pos];\n" +
|
||||
" let imageLink = \"\";\n" +
|
||||
" return imageLink;\n" +
|
||||
" }", imageLinkFlagJSArrStr
|
||||
)
|
||||
|
||||
// https://api.highcharts.com.cn/highcharts#xAxis.labels.formatter
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.xAxis?.labels?.apply {
|
||||
useHTML(true)
|
||||
.formatter(xLabelsFormatter)
|
||||
}
|
||||
aaOptions.plotOptions?.column?.groupPadding(0.005f)
|
||||
|
||||
// /Custom tooltip style/
|
||||
// String tooltipFormatter ={String stringWithFormat:(AAJSFunc(function () {
|
||||
// let imageFlag = %[this.point.index];
|
||||
// let imageLink = "
|
||||
// ";
|
||||
// return imageLink
|
||||
// + " 🌕 🌖 🌗 🌘 🌑 🌒 🌓 🌔
|
||||
// "
|
||||
// + " Support JavaScript Function Just Right Now !!!
|
||||
// "
|
||||
// + " The Gold Price For 2020 "
|
||||
// + this.x
|
||||
// + " Is "
|
||||
// + this.y
|
||||
// + " Dollars ";
|
||||
// })),imageLinkFlagJSArrStr];
|
||||
val tooltipFormatter = String.format(
|
||||
("function () {\n" +
|
||||
" let imageFlag = %s[this.point.index];\n" +
|
||||
" let imageLink = \"<span><img src=\\\"https://image.flaticon.com/icons/svg/197/\" + imageFlag + \".svg\\\" style=\\\"width: 30px; height: 30px;\\\"/><br></span>\";\n" +
|
||||
" return imageLink\n" +
|
||||
" + \" \uD83C\uDF15 \uD83C\uDF16 \uD83C\uDF17 \uD83C\uDF18 \uD83C\uDF11 \uD83C\uDF12 \uD83C\uDF13 \uD83C\uDF14 <br/> \"\n" +
|
||||
" + \" Support JavaScript Function Just Right Now !!! <br/> \"\n" +
|
||||
" + \" The Gold Price For <b>2020 \"\n" +
|
||||
" + this.x\n" +
|
||||
" + \" </b> Is <b> \"\n" +
|
||||
" + this.y\n" +
|
||||
" + \" </b> Dollars \";\n" +
|
||||
" }"), imageLinkFlagJSArrStr
|
||||
)
|
||||
aaOptions.tooltip?.apply {
|
||||
shared(false)
|
||||
.useHTML(true)
|
||||
.formatter(tooltipFormatter)
|
||||
}
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
|
||||
private fun javaScriptArrayStringWithJavaArray(javaArray: Array<String>): String {
|
||||
val originalJsArrStr = StringBuilder()
|
||||
for (element: Any in javaArray) {
|
||||
originalJsArrStr.append("'").append(element.toString()).append("',")
|
||||
}
|
||||
return "[$originalJsArrStr]"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+1139
File diff suppressed because it is too large
Load Diff
+217
@@ -0,0 +1,217 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.chartcomposer
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.*
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAColor
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAGradientColor
|
||||
|
||||
object JSFunctionForAALegendComposer {
|
||||
|
||||
fun disableLegendClickEventForNormalChart(): AAOptions {
|
||||
val element1 = AASeriesElement()
|
||||
.name("Predefined symbol")
|
||||
.data(arrayOf(0.45, 0.43, 0.50, 0.55, 0.58, 0.62, 0.83, 0.39, 0.56, 0.67, 0.50, 0.34, 0.50, 0.67, 0.58, 0.29, 0.46, 0.23, 0.47, 0.46, 0.38, 0.56, 0.48, 0.36))
|
||||
|
||||
val element2 = AASeriesElement()
|
||||
.name("Image symbol")
|
||||
.data(arrayOf(0.38, 0.31, 0.32, 0.32, 0.64, 0.66, 0.86, 0.47, 0.52, 0.75, 0.52, 0.56, 0.54, 0.60, 0.46, 0.63, 0.54, 0.51, 0.58, 0.64, 0.60, 0.45, 0.36, 0.67))
|
||||
|
||||
val element3 = AASeriesElement()
|
||||
.name("Base64 symbol (*)")
|
||||
.data(arrayOf(0.46, 0.32, 0.53, 0.58, 0.86, 0.68, 0.85, 0.73, 0.69, 0.71, 0.91, 0.74, 0.60, 0.50, 0.39, 0.67, 0.55, 0.49, 0.65, 0.45, 0.64, 0.47, 0.63, 0.64))
|
||||
|
||||
val element4 = AASeriesElement()
|
||||
.name("Custom symbol")
|
||||
.data(arrayOf(0.60, 0.51, 0.52, 0.53, 0.64, "null", "null", "null", "null", "null", "null", "null", 0.65, 0.74, 0.66, 0.65, 0.71, 0.59, 0.65, 0.77, 0.52, 0.53, 0.58, 0.53))
|
||||
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Line)
|
||||
.title("CUSTOM LEGEND STYLE")
|
||||
.subtitle("LEGEND ON THE TOP_RIGHT SIDE WITH VERTICAL STYLE")
|
||||
.subtitleAlign(AAChartAlignType.Left)
|
||||
.markerRadius(0)
|
||||
.backgroundColor(AAColor.White)
|
||||
.dataLabelsEnabled(false)
|
||||
.yAxisGridLineWidth(0)
|
||||
.yAxisTitle("percent values")
|
||||
.stacking(AAChartStackingType.Normal)
|
||||
.colorsTheme(arrayOf("mediumspringgreen", "deepskyblue", "red", "sandybrown"))
|
||||
.series(arrayOf(element1, element2, element3, element4))
|
||||
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
|
||||
//https://github.com/AAChartModel/AAChartCore-Kotlin/issues/61
|
||||
aaOptions.chart?.animation = false //turn off animation
|
||||
|
||||
aaOptions.tooltip?.apply {
|
||||
backgroundColor(AAGradientColor.Firebrick)
|
||||
.style(AAStyle.style(AAColor.White))
|
||||
}
|
||||
|
||||
aaOptions.yAxis?.labels?.format = "{value} %"//给y轴添加单位
|
||||
|
||||
aaOptions.xAxis?.apply {
|
||||
gridLineColor(AAColor.DarkGray)
|
||||
.gridLineWidth(1)
|
||||
.minorGridLineColor(AAColor.LightGray)
|
||||
.minorGridLineWidth(0.5)
|
||||
.minorTickInterval("auto")
|
||||
}
|
||||
|
||||
aaOptions.yAxis?.apply {
|
||||
gridLineColor(AAColor.DarkGray)
|
||||
.gridLineWidth(1)
|
||||
.minorGridLineColor(AAColor.LightGray)
|
||||
.minorGridLineWidth(0.5)
|
||||
.minorTickInterval("auto")
|
||||
}
|
||||
|
||||
aaOptions.legend?.apply {
|
||||
enabled(true)
|
||||
.verticalAlign(AAChartVerticalAlignType.Top)
|
||||
.layout(AAChartLayoutType.Vertical)
|
||||
.align(AAChartAlignType.Right)
|
||||
}
|
||||
|
||||
aaOptions.defaultOptions = AALang()
|
||||
.resetZoom("重置缩放比例")
|
||||
.thousandsSep(",")
|
||||
|
||||
aaOptions.plotOptions?.series?.connectNulls(true)
|
||||
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
// //https://github.com/AAChartModel/AAChartKit-Swift/issues/391
|
||||
// //https://github.com/AAChartModel/AAChartKit-Swift/issues/393
|
||||
fun disableLegendClickEventForPieChart(): AAOptions {
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Pie)
|
||||
.backgroundColor(AAColor.White)
|
||||
.title("LANGUAGE MARKET SHARES JANUARY,2020 TO MAY")
|
||||
.subtitle("virtual data")
|
||||
.dataLabelsEnabled(true) //是否直接显示扇形图数据
|
||||
.yAxisTitle("℃")
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Language market shares")
|
||||
.innerSize("20%") //内部圆环半径大小占比(内部圆环半径/扇形图半径),
|
||||
.allowPointSelect(true)
|
||||
.states(AAStates()
|
||||
.hover(AAHover()
|
||||
.enabled(false))) //禁用点击区块之后出现的半透明遮罩层
|
||||
.data(arrayOf(
|
||||
arrayOf("Java", 67),
|
||||
arrayOf("Swift", 999),
|
||||
arrayOf("Python", 83),
|
||||
arrayOf("OC", 11),
|
||||
arrayOf("Go", 30)))))
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.legend?.labelFormat("{name} {percentage:.2f}%")
|
||||
|
||||
//禁用饼图图例点击事件
|
||||
aaOptions.plotOptions?.series
|
||||
?.point(AAPoint()
|
||||
.events(AAPointEvents()
|
||||
.legendItemClick(
|
||||
"" +
|
||||
"function() { " +
|
||||
"return false; " +
|
||||
"}")))
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
|
||||
//https://bbs.hcharts.cn/article-109-1.html
|
||||
//图表自带的图例点击事件是:
|
||||
//点击某个显示/隐藏的图例,该图例对应的serie就隐藏/显示。
|
||||
//个人觉得不合理,正常来说,有多条折线(或其他类型的图表),点击某个图例是想只看该图例对应的数据;
|
||||
//于是修改了图例点击事件。
|
||||
//
|
||||
//实现的效果是(以折线图为例):
|
||||
//1. 当某条折线隐藏时,点击该折线的图例 --> 该折线显示;
|
||||
//2. 当全部折线都显示时,点击某个图例 --> 该图例对应的折线显示,其他折线均隐藏;
|
||||
//3. 当只有一条折线显示时,点击该折线的图例 --> 全部折线均显示;
|
||||
//4. 其他情况,按默认处理:
|
||||
//显示 --> 隐藏;
|
||||
//隐藏 --> 显示;
|
||||
//Customized legengItemClick Event online: http://code.hcharts.cn/rencht/hhhhLv/share
|
||||
fun customLegendItemClickEvent(): AAOptions {
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Column)
|
||||
.stacking(AAChartStackingType.Normal)
|
||||
.colorsTheme(arrayOf("#fe117c", "#ffc069", "#06caf4", "#7dffc0")) //设置主题颜色数组
|
||||
.markerRadius(0)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.data(arrayOf(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6)),
|
||||
AASeriesElement()
|
||||
.name("NewYork")
|
||||
.data(arrayOf(0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5)),
|
||||
AASeriesElement()
|
||||
.name("London")
|
||||
.data(arrayOf(0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0)),
|
||||
AASeriesElement()
|
||||
.name("Berlin")
|
||||
.data(arrayOf(3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8))))
|
||||
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
|
||||
aaOptions.legend?.apply {
|
||||
enabled(true)
|
||||
.align(AAChartAlignType.Right) //设置图例位于水平方向上的右侧
|
||||
.layout(AAChartLayoutType.Vertical) //设置图例排列方式为垂直排布
|
||||
.verticalAlign(AAChartVerticalAlignType.Top) //设置图例位于竖直方向上的顶部
|
||||
}
|
||||
|
||||
//自定义图例点击事件
|
||||
aaOptions.plotOptions?.series?.events = AASeriesEvents()
|
||||
.legendItemClick(
|
||||
"""function(event) {
|
||||
function getVisibleMode(series, serieName) {
|
||||
var allVisible = true;
|
||||
var allHidden = true;
|
||||
for (var i = 0; i < series.length; i++) {
|
||||
if (series[i].name == serieName)
|
||||
continue;
|
||||
allVisible &= series[i].visible;
|
||||
allHidden &= (!series[i].visible);
|
||||
}
|
||||
if (allVisible && !allHidden)
|
||||
return 'all-visible';
|
||||
if (allHidden && !allVisible)
|
||||
return 'all-hidden';
|
||||
return 'other-cases';
|
||||
}
|
||||
|
||||
var series = this.chart.series;
|
||||
var mode = getVisibleMode(series, this.name);
|
||||
var enableDefault = false;
|
||||
if (!this.visible) {
|
||||
enableDefault = true;
|
||||
}
|
||||
else if (mode == 'all-visible') {
|
||||
var seriesLength = series.length;
|
||||
for (var i = 0; i < seriesLength; i++) {
|
||||
var serie = series[i];
|
||||
serie.hide();
|
||||
}
|
||||
this.show();
|
||||
}
|
||||
else if (mode == 'all-hidden') {
|
||||
var seriesLength = series.length;
|
||||
for (var i = 0; i < seriesLength; i++) {
|
||||
var serie = series[i];
|
||||
serie.show();
|
||||
}
|
||||
}
|
||||
else {
|
||||
enableDefault = true;
|
||||
}
|
||||
return enableDefault;
|
||||
}"""
|
||||
)
|
||||
return aaOptions
|
||||
}
|
||||
}
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
package com.github.aachartmodel.aainfographics.demo.chartcomposer
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.*
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAColor
|
||||
import com.github.aachartmodel.aainfographics.aatools.AAGradientColor
|
||||
import com.github.aachartmodel.aainfographics.aatools.AALinearGradientDirection
|
||||
|
||||
object JSFunctionForAAOptionsComposer {
|
||||
fun customDoubleXAxesChart(): AAOptions {
|
||||
val gradientColorDic1 = AAGradientColor.linearGradient(
|
||||
AALinearGradientDirection.ToTop,
|
||||
"#7052f4",
|
||||
"#00b0ff"//颜色字符串设置支持十六进制类型和 rgba 类型
|
||||
)
|
||||
|
||||
val gradientColorDic2 = AAGradientColor.linearGradient(
|
||||
AALinearGradientDirection.ToTop,
|
||||
"#EF71FF",
|
||||
"#4740C8"//颜色字符串设置支持十六进制类型和 rgba 类型
|
||||
)
|
||||
|
||||
val aaChart = AAChart()
|
||||
.type(AAChartType.Bar)
|
||||
|
||||
val aaTitle = AATitle()
|
||||
.text("2015 年德国人口金字塔")
|
||||
.style(AAStyle()
|
||||
.color("#000000")
|
||||
.fontSize(12.0))
|
||||
|
||||
val aaCategories = arrayOf("0-4", "5-9", "10-14", "15-19", "20-24", "25-29",
|
||||
"30-34", "35-39", "40-44", "45-49", "50-54", "55-59", "60-64", "65-69", "70-74",
|
||||
"75-79", "80-84", "85-89", "90-94", "95-99", "100 + ")
|
||||
|
||||
val aaXAxis1 = AAXAxis()
|
||||
.reversed(true)
|
||||
.categories(aaCategories)
|
||||
.labels(AALabels()
|
||||
.step(1))
|
||||
|
||||
val aaXAxis2 = AAXAxis()
|
||||
.reversed(true)
|
||||
.opposite(true)
|
||||
.categories(aaCategories)
|
||||
.linkedTo(0)
|
||||
.labels(AALabels()
|
||||
.step(1))
|
||||
|
||||
val aaYAxis = AAYAxis()
|
||||
.gridLineWidth(0)// Y 轴网格线宽度
|
||||
.title(AATitle()
|
||||
.text(""))//Y 轴标题
|
||||
.labels(AALabels()
|
||||
.formatter("""
|
||||
function () {
|
||||
return (Math.abs(this.value) / 1000000) + 'M';
|
||||
}
|
||||
""".trimIndent()
|
||||
))
|
||||
.min(-4000000)
|
||||
.max(4000000)
|
||||
|
||||
val aaPlotOptions = AAPlotOptions()
|
||||
.series(AASeries()
|
||||
.animation(AAAnimation()
|
||||
.duration(800)
|
||||
.easing(AAChartAnimationType.Bounce))
|
||||
.stacking(AAChartStackingType.Normal))
|
||||
|
||||
val aaTooltip = AATooltip()
|
||||
.enabled(true)
|
||||
.shared(false)
|
||||
.formatter("""
|
||||
function () {
|
||||
return '<b>' + this.series.name + ', age ' + this.point.category + '</b><br/>' +
|
||||
'人口: ' + Highcharts.numberFormat(Math.abs(this.point.y), 0);
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
val aaSeriesElement1 = AASeriesElement()
|
||||
.name("Men")
|
||||
.color(gradientColorDic1)
|
||||
.data(arrayOf(-1746181, -1884428, -2089758, -2222362, -2537431, -2507081, -2443179,
|
||||
-2664537, -3556505, -3680231, -3143062, -2721122, -2229181, -2227768, -2176300,
|
||||
-1329968, -836804, -354784, -90569, -28367, -3878))
|
||||
|
||||
val aaSeriesElement2 = AASeriesElement()
|
||||
.name("Women")
|
||||
.color(gradientColorDic2)
|
||||
.data(arrayOf(1656154, 1787564, 1981671, 2108575, 2403438, 2366003, 2301402, 2519874,
|
||||
3360596, 3493473, 3050775, 2759560, 2304444, 2426504, 2568938, 1785638, 1447162,
|
||||
1005011, 330870, 130632, 21208))
|
||||
|
||||
return AAOptions()
|
||||
.chart(aaChart)
|
||||
.title(aaTitle)
|
||||
.xAxisArray(arrayOf(aaXAxis1, aaXAxis2))
|
||||
.yAxis(aaYAxis)
|
||||
.plotOptions(aaPlotOptions)
|
||||
.tooltip(aaTooltip)
|
||||
.series(arrayOf(aaSeriesElement1, aaSeriesElement2))
|
||||
}
|
||||
|
||||
//https://github.com/AAChartModel/AAChartKit/issues/967
|
||||
fun disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction(): AAOptions {
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Bar)
|
||||
.title("Custom Bar Chart select color")
|
||||
.yAxisReversed(true)
|
||||
.xAxisReversed(true)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("ElementOne")
|
||||
.data(arrayOf(211, 183, 157, 133, 111, 91, 73, 57, 43, 31, 21, 13, 7, 3))
|
||||
.allowPointSelect(true)
|
||||
.states(AAStates()
|
||||
.hover(AAHover()
|
||||
.color(AAColor.Yellow))
|
||||
.select(AASelect()
|
||||
.color(AAColor.Red)))))
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
val aaPoint: AAPoint = AAPoint()
|
||||
.events(AAPointEvents()
|
||||
.click("""
|
||||
function () {
|
||||
if (this.selected == true) {
|
||||
this.selected = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
"""))
|
||||
aaOptions.plotOptions?.series
|
||||
?.point(aaPoint)
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
// Refer to the issue https://github.com/AAChartModel/AAChartKit/issues/589
|
||||
fun customizeEveryDataLabelSinglelyByDataLabelsFormatter(): AAOptions {
|
||||
val aaChartModel = AAChartModel()
|
||||
.chartType(AAChartType.Areaspline) //图表类型
|
||||
.dataLabelsEnabled(true)
|
||||
.tooltipEnabled(false)
|
||||
.colorsTheme(arrayOf(AAGradientColor.FizzyPeach))
|
||||
.markerRadius(0)
|
||||
.legendEnabled(false)
|
||||
.categories(arrayOf(
|
||||
"美国🇺🇸",
|
||||
"欧洲🇪🇺",
|
||||
"中国🇨🇳",
|
||||
"日本🇯🇵",
|
||||
"韩国🇰🇷",
|
||||
"越南🇻🇳",
|
||||
"中国香港🇭🇰"))
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.data(arrayOf(7.0, 6.9, 2.5, 14.5, 18.2, 21.5, 5.2))))
|
||||
val aaOptions = aaChartModel.aa_toAAOptions()
|
||||
aaOptions.yAxis?.gridLineDashStyle = AAChartLineDashStyleType.LongDash.value //设置Y轴的网格线样式为 AAChartLineDashStyleType.LongDash
|
||||
val unitArr = arrayOf("美元", "欧元", "人民币", "日元", "韩元", "越南盾", "港币")
|
||||
val unitJSArrStr: String = javaScriptArrayStringWithJavaArray(unitArr)
|
||||
val dataLabelsFormatter = String.format(
|
||||
"function () {\n" +
|
||||
" return this.y + %s[this.point.index]; \n" + //单组 series 图表, 获取选中的点的索引是 this.point.index ,多组并且共享提示框,则是this.points[0].index
|
||||
" }", unitJSArrStr
|
||||
)
|
||||
val aaDatalabels = aaOptions.plotOptions?.series?.dataLabels
|
||||
aaDatalabels?.apply {
|
||||
style(AAStyle.style(AAColor.Red, 10, AAChartFontWeightType.Bold, "1px 1px contrast"))
|
||||
.formatter(dataLabelsFormatter)
|
||||
.backgroundColor(AAColor.White) // white color
|
||||
.borderColor(AAColor.Red) // red color
|
||||
.borderRadius(1.5)
|
||||
.borderWidth(1.3)
|
||||
.x(3).y(-20)
|
||||
.verticalAlign(AAChartVerticalAlignType.Middle)
|
||||
}
|
||||
return aaOptions
|
||||
}
|
||||
|
||||
//https://github.com/AAChartModel/AAChartKit-Swift/issues/404
|
||||
fun configureColorfulDataLabelsForPieChart(): AAOptions {
|
||||
return AAOptions()
|
||||
.title(AATitle()
|
||||
.text("Colorful DataLabels For Pie Chart"))
|
||||
.colors(arrayOf(
|
||||
"#0c9674", "#7dffc0", "#ff3333", "#facd32", "#ffffa0",
|
||||
"#EA007B", "#fe117c", "#ffc069", "#06caf4", "#7dffc0"))
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.type(AAChartType.Pie)
|
||||
.name("语言热度值")
|
||||
.innerSize("20%") //内部圆环半径大小占比
|
||||
.borderWidth(0) //描边的宽度
|
||||
.allowPointSelect(true) //是否允许在点击数据点标记(扇形图点击选中的块发生位移)
|
||||
.states(AAStates()
|
||||
.hover(AAHover()
|
||||
.enabled(false))) //禁用点击区块之后出现的半透明遮罩层
|
||||
.dataLabels(AADataLabels()
|
||||
.allowOverlap(true) //允许字符重叠
|
||||
.useHTML(true)
|
||||
.formatter("""
|
||||
function () {
|
||||
const point = this.point;
|
||||
return '<span style=\"color: ' + point.color + '\">' +
|
||||
point.name + ': ' + point.y + '%</span>';
|
||||
}
|
||||
"""))
|
||||
.data(arrayOf(
|
||||
arrayOf("Firefox", 3336.2),
|
||||
arrayOf("IE", 26.8),
|
||||
arrayOf("Chrome", 666.8),
|
||||
arrayOf("Safari", 88.5),
|
||||
arrayOf("Opera", 46.0),
|
||||
arrayOf("Others", 223.0),
|
||||
arrayOf("Firefox", 3336.2),
|
||||
arrayOf("IE", 26.8),
|
||||
arrayOf("Chrome", 666.8),
|
||||
arrayOf("Safari", 88.5),
|
||||
arrayOf("Opera", 46.0),
|
||||
arrayOf("Others", 223.0)
|
||||
))))
|
||||
}
|
||||
|
||||
|
||||
fun javaScriptArrayStringWithJavaArray(javaArray: Array<String>): String {
|
||||
val originalJsArrStr = StringBuilder()
|
||||
for (element: Any in javaArray) {
|
||||
originalJsArrStr.append("'").append(element.toString()).append("',")
|
||||
}
|
||||
return "[$originalJsArrStr]"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+1970
File diff suppressed because it is too large
Load Diff
+712
@@ -0,0 +1,712 @@
|
||||
/**
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore ◉◉◉
|
||||
* ◉◉◉ https://github.com/AAChartModel/AAChartCore-Kotlin ◉◉◉
|
||||
* ◉◉◉................................................... ◉◉◉
|
||||
* ◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉ ...... SOURCE CODE ......◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* -------------------------------------------------------------------------------
|
||||
*
|
||||
* 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔
|
||||
*
|
||||
* Please contact me on GitHub,if there are any problems encountered in use.
|
||||
* GitHub Issues : https://github.com/AAChartModel/AAChartCore-Kotlin/issues
|
||||
* -------------------------------------------------------------------------------
|
||||
* And if you want to contribute for this project, please contact me as well
|
||||
* GitHub : https://github.com/AAChartModel
|
||||
* StackOverflow : https://stackoverflow.com/users/7842508/codeforu
|
||||
* JianShu : http://www.jianshu.com/u/f1e6753d4254
|
||||
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
|
||||
*
|
||||
* -------------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
package com.github.aachartmodel.aainfographics.demo.chartcomposer
|
||||
|
||||
import com.github.aachartmodel.aainfographics.aachartcreator.*
|
||||
import com.github.aachartmodel.aainfographics.aaoptionsmodel.*
|
||||
import com.github.aachartmodel.aainfographics.aatools.*
|
||||
import java.util.*
|
||||
|
||||
object MixedChartComposer {
|
||||
|
||||
fun arearangeMixedLine(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.title("LANGUAGE MARKET SHARES JANUARY,2020 TO MAY")
|
||||
.subtitle("virtual data")
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Temperature")
|
||||
.color("#1E90FF")
|
||||
.type(AAChartType.Line)
|
||||
.data(arrayOf(
|
||||
arrayOf(12464064, 21.5),
|
||||
arrayOf(12464928, 22.1),
|
||||
arrayOf(12465792, 23.0),
|
||||
arrayOf(12466656, 23.8),
|
||||
arrayOf(12467520, 21.4),
|
||||
arrayOf(12468384, 21.3),
|
||||
arrayOf(12469248, 18.3),
|
||||
arrayOf(12470112, 15.4),
|
||||
arrayOf(12470976, 16.4),
|
||||
arrayOf(12471840, 17.7),
|
||||
arrayOf(12472704, 17.5),
|
||||
arrayOf(12473568, 17.6),
|
||||
arrayOf(12474432, 17.7),
|
||||
arrayOf(12475296, 16.8),
|
||||
arrayOf(12476160, 17.7),
|
||||
arrayOf(12477024, 16.3),
|
||||
arrayOf(12477888, 17.8),
|
||||
arrayOf(12478752, 18.1),
|
||||
arrayOf(12479616, 17.2),
|
||||
arrayOf(12480480, 14.4),
|
||||
arrayOf(12481344, 13.7),
|
||||
arrayOf(12482208, 15.7),
|
||||
arrayOf(12483072, 14.6),
|
||||
arrayOf(12483936, 15.3),
|
||||
arrayOf(12484800, 15.3),
|
||||
arrayOf(12485664, 15.8),
|
||||
arrayOf(12486528, 15.2),
|
||||
arrayOf(12487392, 14.8),
|
||||
arrayOf(12488256, 14.4),
|
||||
arrayOf(12489120, 15.0),
|
||||
arrayOf(12489984, 13.6)
|
||||
))
|
||||
.zIndex(1),
|
||||
AASeriesElement()
|
||||
.name("Range")
|
||||
.color("#1E90FF")
|
||||
.type(AAChartType.Arearange)
|
||||
.lineWidth(0f)
|
||||
.fillOpacity(0.3f)
|
||||
.data(arrayOf(
|
||||
arrayOf(12464064, 14.3, 27.7),
|
||||
arrayOf(12464928, 14.5, 27.8),
|
||||
arrayOf(12465792, 15.5, 29.6),
|
||||
arrayOf(12466656, 16.7, 30.7),
|
||||
arrayOf(12467520, 16.5, 25.0),
|
||||
arrayOf(12468384, 17.8, 25.7),
|
||||
arrayOf(12469248, 13.5, 24.8),
|
||||
arrayOf(12470112, 10.5, 21.4),
|
||||
arrayOf(12470976, 9.20, 23.8),
|
||||
arrayOf(12471840, 11.6, 21.8),
|
||||
arrayOf(12472704, 10.7, 23.7),
|
||||
arrayOf(12473568, 11.0, 23.3),
|
||||
arrayOf(12474432, 11.6, 23.7),
|
||||
arrayOf(12475296, 11.8, 20.7),
|
||||
arrayOf(12476160, 12.6, 22.4),
|
||||
arrayOf(12477024, 13.6, 19.6),
|
||||
arrayOf(12477888, 11.4, 22.6),
|
||||
arrayOf(12478752, 13.2, 25.0),
|
||||
arrayOf(12479616, 14.2, 21.6),
|
||||
arrayOf(12480480, 13.1, 17.1),
|
||||
arrayOf(12481344, 12.2, 15.5),
|
||||
arrayOf(12482208, 12.0, 20.8),
|
||||
arrayOf(12483072, 12.0, 17.1),
|
||||
arrayOf(12483936, 12.7, 18.3),
|
||||
arrayOf(12484800, 12.4, 19.4),
|
||||
arrayOf(12485664, 12.6, 19.9),
|
||||
arrayOf(12486528, 11.9, 20.2),
|
||||
arrayOf(12487392, 11.0, 19.3),
|
||||
arrayOf(12488256, 10.8, 17.8),
|
||||
arrayOf(12489120, 11.8, 18.5),
|
||||
arrayOf(12489984, 10.8, 16.1)
|
||||
))
|
||||
.zIndex(0)))
|
||||
}
|
||||
|
||||
fun configureColumnrangeMixedLineChart(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.colorsTheme(arrayOf("#1e90ff", "#EA007B", "#49C1B6", "#FDC20A", "#F78320", "#068E81"))//主题颜色数组
|
||||
.chartType(AAChartType.Line)
|
||||
.dataLabelsEnabled(false)
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.BorderBlank)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Temperature")
|
||||
.type(AAChartType.Columnrange) //COLUMN_RANGE
|
||||
.data(arrayOf(
|
||||
arrayOf(-9.7, 9.4),
|
||||
arrayOf(-8.7, 6.5),
|
||||
arrayOf(-3.5, 9.4),
|
||||
arrayOf(-1.4, 19.9),
|
||||
arrayOf(0.0, 22.6),
|
||||
arrayOf(2.9, 29.5),
|
||||
arrayOf(9.2, 30.7),
|
||||
arrayOf(7.3, 26.5),
|
||||
arrayOf(4.4, 18.0),
|
||||
arrayOf(-3.1, 11.4),
|
||||
arrayOf(-5.2, 10.4),
|
||||
arrayOf(-9.9, 16.8)
|
||||
)),
|
||||
AASeriesElement()
|
||||
.name("Tokyo")
|
||||
.data(arrayOf(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6)),
|
||||
AASeriesElement()
|
||||
.name("New York")
|
||||
.data(arrayOf(0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5)),
|
||||
AASeriesElement()
|
||||
.name("Berlin")
|
||||
.data(arrayOf(0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0)),
|
||||
AASeriesElement()
|
||||
.name("London")
|
||||
.data(arrayOf(3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8))
|
||||
))
|
||||
}
|
||||
|
||||
fun configureStackingColumnMixedLineChart(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.title("16年1月-16年11月充值客单分析")//图形标题
|
||||
.subtitle("BY MICVS")//图形副标题
|
||||
.chartType(AAChartType.Column)
|
||||
.stacking(AAChartStackingType.Normal)
|
||||
.legendEnabled(true)
|
||||
.colorsTheme(arrayOf(
|
||||
AAGradientColor.OceanBlue,
|
||||
AAGradientColor.Sanguine,
|
||||
AAGradientColor.LusciousLime))
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("新用户")
|
||||
.data(arrayOf(82.89,67.54,62.07,59.43,67.02,67.09,35.66,71.78,81.61,78.85,79.12,72.30))
|
||||
.dataLabels(
|
||||
AADataLabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color(AAColor.Red)
|
||||
.fontSize(11))),
|
||||
AASeriesElement()
|
||||
.name("老用户")
|
||||
.data(arrayOf(198.66,330.81,151.95,160.12,222.56,229.05,128.53,250.91,224.47,473.99,126.85,260.50))
|
||||
.dataLabels(
|
||||
AADataLabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color("#000000")
|
||||
.fontSize(11))),
|
||||
AASeriesElement()
|
||||
.name("总量")
|
||||
.type(AAChartType.Line)
|
||||
.data(arrayOf(281.55,398.35,214.02,219.55,289.57,296.14,164.18,322.69,306.08,552.84,205.97,332.79))
|
||||
.dataLabels(
|
||||
AADataLabels()
|
||||
.enabled(true)
|
||||
.style(AAStyle()
|
||||
.color("#000000")
|
||||
.fontSize(15)
|
||||
.fontWeight(AAChartFontWeightType.Bold)))))
|
||||
}
|
||||
|
||||
fun dashStyleTypeMixedChart(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.chartType(AAChartType.Spline)//图形类型
|
||||
.dataLabelsEnabled(false)//是否显示数字
|
||||
.stacking(AAChartStackingType.Normal)
|
||||
.markerRadius(0)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("SolidLine")
|
||||
.lineWidth(3)
|
||||
.data(arrayOf(50, 320, 230, 370, 230, 400, 320)),
|
||||
AASeriesElement()
|
||||
.name("Dash")
|
||||
.lineWidth(3)
|
||||
.dashStyle(AAChartLineDashStyleType.Dash)
|
||||
.data(arrayOf(50, 320, 230, 370, 230, 400, 320)),
|
||||
AASeriesElement()
|
||||
.name("DashDot")
|
||||
.lineWidth(3)
|
||||
.dashStyle(AAChartLineDashStyleType.DashDot)
|
||||
.data(arrayOf(50, 320, 230, 370, 230, 400, 320)),
|
||||
AASeriesElement()
|
||||
.name("LongDash")
|
||||
.lineWidth(3)
|
||||
.dashStyle(AAChartLineDashStyleType.LongDash)
|
||||
.data(arrayOf(50, 320, 230, 370, 230, 400, 320)),
|
||||
AASeriesElement()
|
||||
.name("LongDashDot")
|
||||
.lineWidth(3)
|
||||
.dashStyle(AAChartLineDashStyleType.LongDashDot)
|
||||
.data(arrayOf(50, 320, 230, 370, 230, 400, 320))
|
||||
))
|
||||
}
|
||||
|
||||
fun negativeColorMixedChart(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.dataLabelsEnabled(false)//是否显示数字
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Column")
|
||||
.type(AAChartType.Column)
|
||||
.data(arrayOf(
|
||||
-6.4, -5.2, -3.0, 0.2, 2.3, 5.5, 8.4, 8.3, 5.1, 0.9, -1.1, -4.0,
|
||||
-6.4, -5.2, -3.0, 0.2, 2.3, 5.5, 8.4, 8.3, 5.1, 0.9, -1.1, -4.0,
|
||||
-6.4, -5.2, -3.0, 0.2, 2.3, 5.5, 8.4, 8.3, 5.1, 0.9, -1.1, -4.0
|
||||
))
|
||||
.color("#0088FF")
|
||||
.negativeColor("#FF0000")
|
||||
.threshold(4)//default:0
|
||||
))
|
||||
}
|
||||
|
||||
internal fun scatterMixedLine(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.dataLabelsEnabled(false)//是否显示数字
|
||||
.chartType(AAChartType.Scatter)
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
|
||||
.markerSymbol(AAChartSymbolType.Circle)
|
||||
.markerRadius(8)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Scatter")
|
||||
.data(arrayOf(
|
||||
arrayOf(0.067732, 3.176513),
|
||||
arrayOf(0.427810, 3.816464),
|
||||
arrayOf(0.995731, 4.550095),
|
||||
arrayOf(0.738336, 4.256571),
|
||||
arrayOf(0.981083, 4.560815),
|
||||
arrayOf(0.526171, 3.929515),
|
||||
arrayOf(0.378887, 3.526170),
|
||||
arrayOf(0.033859, 3.156393),
|
||||
arrayOf(0.132791, 3.110301),
|
||||
arrayOf(0.138306, 3.149813),
|
||||
arrayOf(0.247809, 3.476346),
|
||||
arrayOf(0.648270, 4.119688),
|
||||
arrayOf(0.731209, 4.282233),
|
||||
arrayOf(0.236833, 3.486582),
|
||||
arrayOf(0.969788, 4.655492),
|
||||
arrayOf(0.607492, 3.965162),
|
||||
arrayOf(0.358622, 3.514900),
|
||||
arrayOf(0.147846, 3.125947),
|
||||
arrayOf(0.637820, 4.094115),
|
||||
arrayOf(0.230372, 3.476039),
|
||||
arrayOf(0.070237, 3.210610),
|
||||
arrayOf(0.067154, 3.190612),
|
||||
arrayOf(0.925577, 4.631504),
|
||||
arrayOf(0.717733, 4.295890),
|
||||
arrayOf(0.015371, 3.085028),
|
||||
arrayOf(0.335070, 3.448080),
|
||||
arrayOf(0.040486, 3.167440),
|
||||
arrayOf(0.212575, 3.364266),
|
||||
arrayOf(0.617218, 3.993482),
|
||||
arrayOf(0.541196, 3.891471),
|
||||
arrayOf(0.045353, 3.143259),
|
||||
arrayOf(0.126762, 3.114204),
|
||||
arrayOf(0.556486, 3.851484),
|
||||
arrayOf(0.901144, 4.621899),
|
||||
arrayOf(0.958476, 4.580768),
|
||||
arrayOf(0.274561, 3.620992),
|
||||
arrayOf(0.394396, 3.580501),
|
||||
arrayOf(0.872480, 4.618706),
|
||||
arrayOf(0.409932, 3.676867),
|
||||
arrayOf(0.908969, 4.641845),
|
||||
arrayOf(0.166819, 3.175939),
|
||||
arrayOf(0.665016, 4.264980),
|
||||
arrayOf(0.263727, 3.558448),
|
||||
arrayOf(0.231214, 3.436632),
|
||||
arrayOf(0.552928, 3.831052),
|
||||
arrayOf(0.047744, 3.182853),
|
||||
arrayOf(0.365746, 3.498906),
|
||||
arrayOf(0.495002, 3.946833),
|
||||
arrayOf(0.493466, 3.900583),
|
||||
arrayOf(0.792101, 4.238522),
|
||||
arrayOf(0.769660, 4.233080),
|
||||
arrayOf(0.251821, 3.521557),
|
||||
arrayOf(0.181951, 3.203344),
|
||||
arrayOf(0.808177, 4.278105),
|
||||
arrayOf(0.334116, 3.555705),
|
||||
arrayOf(0.338630, 3.502661),
|
||||
arrayOf(0.452584, 3.859776),
|
||||
arrayOf(0.694770, 4.275956),
|
||||
arrayOf(0.590902, 3.916191),
|
||||
arrayOf(0.307928, 3.587961),
|
||||
arrayOf(0.148364, 3.183004),
|
||||
arrayOf(0.702180, 4.225236),
|
||||
arrayOf(0.721544, 4.231083),
|
||||
arrayOf(0.666886, 4.240544),
|
||||
arrayOf(0.124931, 3.222372),
|
||||
arrayOf(0.618286, 4.021445),
|
||||
arrayOf(0.381086, 3.567479),
|
||||
arrayOf(0.385643, 3.562580),
|
||||
arrayOf(0.777175, 4.262059),
|
||||
arrayOf(0.116089, 3.208813),
|
||||
arrayOf(0.115487, 3.169825),
|
||||
arrayOf(0.663510, 4.193949),
|
||||
arrayOf(0.254884, 3.491678),
|
||||
arrayOf(0.993888, 4.533306),
|
||||
arrayOf(0.295434, 3.550108),
|
||||
arrayOf(0.952523, 4.636427),
|
||||
arrayOf(0.307047, 3.557078),
|
||||
arrayOf(0.277261, 3.552874),
|
||||
arrayOf(0.279101, 3.494159),
|
||||
arrayOf(0.175724, 3.206828),
|
||||
arrayOf(0.156383, 3.195266),
|
||||
arrayOf(0.733165, 4.221292),
|
||||
arrayOf(0.848142, 4.413372),
|
||||
arrayOf(0.771184, 4.184347),
|
||||
arrayOf(0.429492, 3.742878),
|
||||
arrayOf(0.162176, 3.201878),
|
||||
arrayOf(0.917064, 4.648964),
|
||||
arrayOf(0.315044, 3.510117),
|
||||
arrayOf(0.201473, 3.274434),
|
||||
arrayOf(0.297038, 3.579622),
|
||||
arrayOf(0.336647, 3.489244),
|
||||
arrayOf(0.666109, 4.237386),
|
||||
arrayOf(0.583888, 3.913749),
|
||||
arrayOf(0.085031, 3.228990),
|
||||
arrayOf(0.687006, 4.286286),
|
||||
arrayOf(0.949655, 4.628614),
|
||||
arrayOf(0.189912, 3.239536),
|
||||
arrayOf(0.844027, 4.457997),
|
||||
arrayOf(0.333288, 3.513384),
|
||||
arrayOf(0.427035, 3.729674),
|
||||
arrayOf(0.466369, 3.834274),
|
||||
arrayOf(0.550659, 3.811155),
|
||||
arrayOf(0.278213, 3.598316),
|
||||
arrayOf(0.918769, 4.692514),
|
||||
arrayOf(0.886555, 4.604859),
|
||||
arrayOf(0.569488, 3.864912),
|
||||
arrayOf(0.066379, 3.184236),
|
||||
arrayOf(0.335751, 3.500796),
|
||||
arrayOf(0.426863, 3.743365),
|
||||
arrayOf(0.395746, 3.622905),
|
||||
arrayOf(0.694221, 4.310796),
|
||||
arrayOf(0.272760, 3.583357),
|
||||
arrayOf(0.503495, 3.901852),
|
||||
arrayOf(0.067119, 3.233521),
|
||||
arrayOf(0.038326, 3.105266),
|
||||
arrayOf(0.599122, 3.865544),
|
||||
arrayOf(0.947054, 4.628625),
|
||||
arrayOf(0.671279, 4.231213),
|
||||
arrayOf(0.434811, 3.791149),
|
||||
arrayOf(0.509381, 3.968271),
|
||||
arrayOf(0.749442, 4.253910),
|
||||
arrayOf(0.058014, 3.194710),
|
||||
arrayOf(0.482978, 3.996503),
|
||||
arrayOf(0.466776, 3.904358),
|
||||
arrayOf(0.357767, 3.503976),
|
||||
arrayOf(0.949123, 4.557545),
|
||||
arrayOf(0.417320, 3.699876),
|
||||
arrayOf(0.920461, 4.613614),
|
||||
arrayOf(0.156433, 3.140401),
|
||||
arrayOf(0.656662, 4.206717),
|
||||
arrayOf(0.616418, 3.969524),
|
||||
arrayOf(0.853428, 4.476096),
|
||||
arrayOf(0.133295, 3.136528),
|
||||
arrayOf(0.693007, 4.279071),
|
||||
arrayOf(0.178449, 3.200603),
|
||||
arrayOf(0.199526, 3.299012),
|
||||
arrayOf(0.073224, 3.209873),
|
||||
arrayOf(0.286515, 3.632942),
|
||||
arrayOf(0.182026, 3.248361),
|
||||
arrayOf(0.621523, 3.995783),
|
||||
arrayOf(0.344584, 3.563262),
|
||||
arrayOf(0.398556, 3.649712),
|
||||
arrayOf(0.480369, 3.951845),
|
||||
arrayOf(0.153350, 3.145031),
|
||||
arrayOf(0.171846, 3.181577),
|
||||
arrayOf(0.867082, 4.637087),
|
||||
arrayOf(0.223855, 3.404964),
|
||||
arrayOf(0.528301, 3.873188),
|
||||
arrayOf(0.890192, 4.633648),
|
||||
arrayOf(0.106352, 3.154768),
|
||||
arrayOf(0.917886, 4.623637),
|
||||
arrayOf(0.014855, 3.078132),
|
||||
arrayOf(0.567682, 3.913596),
|
||||
arrayOf(0.068854, 3.221817),
|
||||
arrayOf(0.603535, 3.938071),
|
||||
arrayOf(0.532050, 3.880822),
|
||||
arrayOf(0.651362, 4.176436),
|
||||
arrayOf(0.901225, 4.648161),
|
||||
arrayOf(0.204337, 3.332312),
|
||||
arrayOf(0.696081, 4.240614),
|
||||
arrayOf(0.963924, 4.532224),
|
||||
arrayOf(0.981390, 4.557105),
|
||||
arrayOf(0.987911, 4.610072),
|
||||
arrayOf(0.990947, 4.636569),
|
||||
arrayOf(0.736021, 4.229813),
|
||||
arrayOf(0.253574, 3.500860),
|
||||
arrayOf(0.674722, 4.245514),
|
||||
arrayOf(0.939368, 4.605182),
|
||||
arrayOf(0.235419, 3.454340),
|
||||
arrayOf(0.110521, 3.180775),
|
||||
arrayOf(0.218023, 3.380820),
|
||||
arrayOf(0.869778, 4.565020),
|
||||
arrayOf(0.196830, 3.279973),
|
||||
arrayOf(0.958178, 4.554241),
|
||||
arrayOf(0.972673, 4.633520),
|
||||
arrayOf(0.745797, 4.281037),
|
||||
arrayOf(0.445674, 3.844426),
|
||||
arrayOf(0.470557, 3.891601),
|
||||
arrayOf(0.549236, 3.849728),
|
||||
arrayOf(0.335691, 3.492215),
|
||||
arrayOf(0.884739, 4.592374),
|
||||
arrayOf(0.918916, 4.632025),
|
||||
arrayOf(0.441815, 3.756750),
|
||||
arrayOf(0.116598, 3.133555),
|
||||
arrayOf(0.359274, 3.567919),
|
||||
arrayOf(0.814811, 4.363382),
|
||||
arrayOf(0.387125, 3.560165),
|
||||
arrayOf(0.982243, 4.564305),
|
||||
arrayOf(0.780880, 4.215055),
|
||||
arrayOf(0.652565, 4.174999),
|
||||
arrayOf(0.870030, 4.586640),
|
||||
arrayOf(0.604755, 3.960008),
|
||||
arrayOf(0.255212, 3.529963),
|
||||
arrayOf(0.730546, 4.213412),
|
||||
arrayOf(0.493829, 3.908685),
|
||||
arrayOf(0.257017, 3.585821),
|
||||
arrayOf(0.833735, 4.374394),
|
||||
arrayOf(0.070095, 3.213817),
|
||||
arrayOf(0.527070, 3.952681),
|
||||
arrayOf(0.116163, 3.129283)
|
||||
))
|
||||
.color("#0088FF"),
|
||||
AASeriesElement()
|
||||
.name("线性回归线")
|
||||
.type(AAChartType.Line)
|
||||
.data(arrayOf(
|
||||
arrayOf(0.014, 3.078),
|
||||
arrayOf(0.969, 4.655)))
|
||||
.color("#FF0000")))
|
||||
}
|
||||
|
||||
|
||||
internal fun negativeColorMixedBubble(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.categories(arrayOf("Saturday", "Friday", "Thursday", "Wednesday", "Tuesday", "Monday", "Sunday"))
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Bubble")
|
||||
.type(AAChartType.Bubble)
|
||||
.data(arrayOf(
|
||||
arrayOf(0,0,5),arrayOf(0,1,1),arrayOf(0,2,0),arrayOf(0,3,0),arrayOf(0,4,0),arrayOf(0,5,0),arrayOf(0,6,0),arrayOf(0,7,0),arrayOf(0,8,0),arrayOf(0,9,0),
|
||||
arrayOf(0,10,0),arrayOf(0,11,2),arrayOf(0,12,4),arrayOf(0,13,1),arrayOf(0,14,1),arrayOf(0,15,3),arrayOf(0,16,4),arrayOf(0,17,6),arrayOf(0,18,4),
|
||||
arrayOf(0,19,4),arrayOf(0,20,3),arrayOf(0,21,3),arrayOf(0,22,2),arrayOf(0,23,5),arrayOf(1,0,7),arrayOf(1,1,0),arrayOf(1,2,0),arrayOf(1,3,0),
|
||||
arrayOf(1,4,0),arrayOf(1,5,0),arrayOf(1,6,0),arrayOf(1,7,0),arrayOf(1,8,0),arrayOf(1,9,0),arrayOf(1,10,5),arrayOf(1,11,2),arrayOf(1,12,2),
|
||||
arrayOf(1,13,6),arrayOf(1,14,9),arrayOf(1,15,11),arrayOf(1,16,6),arrayOf(1,17,7),arrayOf(1,18,8),arrayOf(1,19,12),arrayOf(1,20,5),arrayOf(1,21,5),
|
||||
arrayOf(1,22,7),arrayOf(1,23,2),arrayOf(2,0,1),arrayOf(2,1,1),arrayOf(2,2,0),arrayOf(2,3,0),arrayOf(2,4,0),arrayOf(2,5,0),arrayOf(2,6,0),arrayOf(2,7,0),
|
||||
arrayOf(2,8,0),arrayOf(2,9,0),arrayOf(2,10,3),arrayOf(2,11,2),arrayOf(2,12,1),arrayOf(2,13,9),arrayOf(2,14,8),arrayOf(2,15,10),arrayOf(2,16,6),
|
||||
arrayOf(2,17,5),arrayOf(2,18,5),arrayOf(2,19,5),arrayOf(2,20,7),arrayOf(2,21,4),arrayOf(2,22,2),arrayOf(2,23,4),arrayOf(3,0,7),arrayOf(3,1,3),
|
||||
arrayOf(3,2,0),arrayOf(3,3,0),arrayOf(3,4,0),arrayOf(3,5,0),arrayOf(3,6,0),arrayOf(3,7,0),arrayOf(3,8,1),arrayOf(3,9,0),arrayOf(3,10,5),arrayOf(3,11,4),
|
||||
arrayOf(3,12,7),arrayOf(3,13,14),arrayOf(3,14,13),arrayOf(3,15,12),arrayOf(3,16,9),arrayOf(3,17,5),arrayOf(3,18,5),arrayOf(3,19,10),
|
||||
arrayOf(3,20,6),arrayOf(3,21,4),arrayOf(3,22,4),arrayOf(3,23,1),arrayOf(4,0,1),arrayOf(4,1,3),arrayOf(4,2,0),arrayOf(4,3,0),arrayOf(4,4,0),
|
||||
arrayOf(4,5,1),arrayOf(4,6,0),arrayOf(4,7,0),arrayOf(4,8,0),arrayOf(4,9,2),arrayOf(4,10,4),arrayOf(4,11,4),arrayOf(4,12,2),arrayOf(4,13,4),
|
||||
arrayOf(4,14,4),arrayOf(4,15,14),arrayOf(4,16,12),arrayOf(4,17,1),arrayOf(4,18,8),arrayOf(4,19,5),arrayOf(4,20,3),arrayOf(4,21,7),arrayOf(4,22,3),
|
||||
arrayOf(4,23,0),arrayOf(5,0,2),arrayOf(5,1,1),arrayOf(5,2,0),arrayOf(5,3,3),arrayOf(5,4,0),arrayOf(5,5,0),arrayOf(5,6,0),arrayOf(5,7,0),arrayOf(5,8,2),
|
||||
arrayOf(5,9,0),arrayOf(5,10,4),arrayOf(5,11,1),arrayOf(5,12,5),arrayOf(5,13,10),arrayOf(5,14,5),arrayOf(5,15,7),arrayOf(5,16,11),arrayOf(5,17,6),
|
||||
arrayOf(5,18,0),arrayOf(5,19,5),arrayOf(5,20,3),arrayOf(5,21,4),arrayOf(5,22,2),arrayOf(5,23,0),arrayOf(6,0,1),arrayOf(6,1,0),arrayOf(6,2,0),
|
||||
arrayOf(6,3,0),arrayOf(6,4,0),arrayOf(6,5,0),arrayOf(6,6,0),arrayOf(6,7,0),arrayOf(6,8,0),arrayOf(6,9,0),arrayOf(6,10,1),arrayOf(6,11,0),arrayOf(6,12,2),
|
||||
arrayOf(6,13,1),arrayOf(6,14,3),arrayOf(6,15,4),arrayOf(6,16,0),arrayOf(6,17,0),arrayOf(6,18,0),arrayOf(6,19,0),arrayOf(6,20,1),arrayOf(6,21,2),
|
||||
arrayOf(6,22,2),arrayOf(6,23,6)
|
||||
))
|
||||
.color("#0088FF")
|
||||
.negativeColor("#FF0000")
|
||||
.threshold(4)//default:0
|
||||
))
|
||||
}
|
||||
|
||||
internal fun polygonMixedScatter(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("目标")
|
||||
.type(AAChartType.Polygon)
|
||||
.data(arrayOf(
|
||||
arrayOf(153, 42), arrayOf(149, 46), arrayOf(149, 55), arrayOf(152, 60), arrayOf(159, 70), arrayOf(170, 77), arrayOf(180, 70),
|
||||
arrayOf(180, 60), arrayOf(173, 52), arrayOf(166, 45)
|
||||
)),
|
||||
AASeriesElement()
|
||||
.name("实际值")
|
||||
.type(AAChartType.Scatter)
|
||||
.data(arrayOf(
|
||||
arrayOf(161.2, 51.6), arrayOf(167.5, 59.0), arrayOf(159.5, 49.2), arrayOf(157.0, 63.0), arrayOf(155.8, 53.6),
|
||||
arrayOf(170.0, 59.0), arrayOf(159.1, 47.6), arrayOf(166.0, 69.8), arrayOf(176.2, 66.8), arrayOf(160.2, 75.2),
|
||||
arrayOf(172.5, 55.2), arrayOf(170.9, 54.2), arrayOf(172.9, 62.5), arrayOf(153.4, 42.0), arrayOf(160.0, 50.0),
|
||||
arrayOf(147.2, 49.8), arrayOf(168.2, 49.2), arrayOf(175.0, 73.2), arrayOf(157.0, 47.8), arrayOf(167.6, 68.8),
|
||||
arrayOf(159.5, 50.6), arrayOf(175.0, 82.5), arrayOf(166.8, 57.2), arrayOf(176.5, 87.8), arrayOf(170.2, 72.8),
|
||||
arrayOf(174.0, 54.5), arrayOf(173.0, 59.8), arrayOf(179.9, 67.3), arrayOf(170.5, 67.8), arrayOf(160.0, 47.0),
|
||||
arrayOf(154.4, 46.2), arrayOf(162.0, 55.0), arrayOf(176.5, 83.0), arrayOf(160.0, 54.4), arrayOf(152.0, 45.8),
|
||||
arrayOf(162.1, 53.6), arrayOf(170.0, 73.2), arrayOf(160.2, 52.1), arrayOf(161.3, 67.9), arrayOf(166.4, 56.6),
|
||||
arrayOf(168.9, 62.3), arrayOf(163.8, 58.5), arrayOf(167.6, 54.5), arrayOf(160.0, 50.2), arrayOf(161.3, 60.3),
|
||||
arrayOf(167.6, 58.3), arrayOf(165.1, 56.2), arrayOf(160.0, 50.2), arrayOf(170.0, 72.9), arrayOf(157.5, 59.8),
|
||||
arrayOf(167.6, 61.0), arrayOf(160.7, 69.1), arrayOf(163.2, 55.9), arrayOf(152.4, 46.5), arrayOf(157.5, 54.3),
|
||||
arrayOf(168.3, 54.8), arrayOf(180.3, 60.7), arrayOf(165.5, 60.0), arrayOf(165.0, 62.0), arrayOf(164.5, 60.3),
|
||||
arrayOf(156.0, 52.7), arrayOf(160.0, 74.3), arrayOf(163.0, 62.0), arrayOf(165.7, 73.1), arrayOf(161.0, 80.0),
|
||||
arrayOf(162.0, 54.7), arrayOf(166.0, 53.2), arrayOf(174.0, 75.7), arrayOf(172.7, 61.1), arrayOf(167.6, 55.7),
|
||||
arrayOf(151.1, 48.7), arrayOf(164.5, 52.3), arrayOf(163.5, 50.0), arrayOf(152.0, 59.3), arrayOf(169.0, 62.5),
|
||||
arrayOf(164.0, 55.7), arrayOf(161.2, 54.8), arrayOf(155.0, 45.9), arrayOf(170.0, 70.6), arrayOf(176.2, 67.2),
|
||||
arrayOf(170.0, 69.4), arrayOf(162.5, 58.2), arrayOf(170.3, 64.8), arrayOf(164.1, 71.6), arrayOf(169.5, 52.8),
|
||||
arrayOf(163.2, 59.8), arrayOf(154.5, 49.0), arrayOf(159.8, 50.0), arrayOf(173.2, 69.2), arrayOf(170.0, 55.9),
|
||||
arrayOf(161.4, 63.4), arrayOf(169.0, 58.2), arrayOf(166.2, 58.6), arrayOf(159.4, 45.7), arrayOf(162.5, 52.2),
|
||||
arrayOf(159.0, 48.6), arrayOf(162.8, 57.8), arrayOf(159.0, 55.6), arrayOf(179.8, 66.8), arrayOf(162.9, 59.4),
|
||||
arrayOf(161.0, 53.6), arrayOf(151.1, 73.2), arrayOf(168.2, 53.4), arrayOf(168.9, 69.0), arrayOf(173.2, 58.4),
|
||||
arrayOf(171.8, 56.2), arrayOf(178.0, 70.6), arrayOf(164.3, 59.8), arrayOf(163.0, 72.0), arrayOf(168.5, 65.2),
|
||||
arrayOf(166.8, 56.6), arrayOf(172.7, 105 ), arrayOf(163.5, 51.8), arrayOf(169.4, 63.4), arrayOf(167.8, 59.0),
|
||||
arrayOf(159.5, 47.6), arrayOf(167.6, 63.0), arrayOf(161.2, 55.2), arrayOf(160.0, 45.0), arrayOf(163.2, 54.0),
|
||||
arrayOf(162.2, 50.2), arrayOf(161.3, 60.2), arrayOf(149.5, 44.8), arrayOf(157.5, 58.8), arrayOf(163.2, 56.4),
|
||||
arrayOf(172.7, 62.0), arrayOf(155.0, 49.2), arrayOf(156.5, 67.2), arrayOf(164.0, 53.8), arrayOf(160.9, 54.4),
|
||||
arrayOf(162.8, 58.0), arrayOf(167.0, 59.8), arrayOf(160.0, 54.8), arrayOf(160.0, 43.2), arrayOf(168.9, 60.5),
|
||||
arrayOf(158.2, 46.4), arrayOf(156.0, 64.4), arrayOf(160.0, 48.8), arrayOf(167.1, 62.2), arrayOf(158.0, 55.5),
|
||||
arrayOf(167.6, 57.8), arrayOf(156.0, 54.6), arrayOf(162.1, 59.2), arrayOf(173.4, 52.7), arrayOf(159.8, 53.2),
|
||||
arrayOf(170.5, 64.5), arrayOf(159.2, 51.8), arrayOf(157.5, 56.0), arrayOf(161.3, 63.6), arrayOf(162.6, 63.2),
|
||||
arrayOf(160.0, 59.5), arrayOf(168.9, 56.8), arrayOf(165.1, 64.1), arrayOf(162.6, 50.0), arrayOf(165.1, 72.3),
|
||||
arrayOf(166.4, 55.0), arrayOf(160.0, 55.9), arrayOf(152.4, 60.4), arrayOf(170.2, 69.1), arrayOf(162.6, 84.5),
|
||||
arrayOf(170.2, 55.9), arrayOf(158.8, 55.5), arrayOf(172.7, 69.5), arrayOf(167.6, 76.4), arrayOf(162.6, 61.4),
|
||||
arrayOf(167.6, 65.9), arrayOf(156.2, 58.6), arrayOf(175.2, 66.8), arrayOf(172.1, 56.6), arrayOf(162.6, 58.6),
|
||||
arrayOf(160.0, 55.9), arrayOf(165.1, 59.1), arrayOf(182.9, 81.8), arrayOf(166.4, 70.7), arrayOf(165.1, 56.8),
|
||||
arrayOf(177.8, 60.0), arrayOf(165.1, 58.2), arrayOf(175.3, 72.7), arrayOf(154.9, 54.1), arrayOf(158.8, 49.1),
|
||||
arrayOf(172.7, 75.9), arrayOf(168.9, 55.0), arrayOf(161.3, 57.3), arrayOf(167.6, 55.0), arrayOf(165.1, 65.5),
|
||||
arrayOf(175.3, 65.5), arrayOf(157.5, 48.6), arrayOf(163.8, 58.6), arrayOf(167.6, 63.6), arrayOf(165.1, 55.2),
|
||||
arrayOf(165.1, 62.7), arrayOf(168.9, 56.6), arrayOf(162.6, 53.9), arrayOf(164.5, 63.2), arrayOf(176.5, 73.6),
|
||||
arrayOf(168.9, 62.0), arrayOf(175.3, 63.6), arrayOf(159.4, 53.2), arrayOf(160.0, 53.4), arrayOf(170.2, 55.0),
|
||||
arrayOf(162.6, 70.5), arrayOf(167.6, 54.5), arrayOf(162.6, 54.5), arrayOf(160.7, 55.9), arrayOf(160.0, 59.0),
|
||||
arrayOf(157.5, 63.6), arrayOf(162.6, 54.5), arrayOf(152.4, 47.3), arrayOf(170.2, 67.7), arrayOf(165.1, 80.9),
|
||||
arrayOf(172.7, 70.5), arrayOf(165.1, 60.9), arrayOf(170.2, 63.6), arrayOf(170.2, 54.5), arrayOf(170.2, 59.1),
|
||||
arrayOf(161.3, 70.5), arrayOf(167.6, 52.7), arrayOf(167.6, 62.7), arrayOf(165.1, 86.3), arrayOf(162.6, 66.4),
|
||||
arrayOf(152.4, 67.3), arrayOf(168.9, 63.0), arrayOf(170.2, 73.6), arrayOf(175.2, 62.3), arrayOf(175.2, 57.7),
|
||||
arrayOf(160.0, 55.4), arrayOf(165.1, 104 ), arrayOf(174.0, 55.5), arrayOf(170.2, 77.3), arrayOf(160.0, 80.5),
|
||||
arrayOf(167.6, 64.5), arrayOf(167.6, 72.3), arrayOf(167.6, 61.4), arrayOf(154.9, 58.2), arrayOf(162.6, 81.8),
|
||||
arrayOf(175.3, 63.6), arrayOf(171.4, 53.4), arrayOf(157.5, 54.5), arrayOf(165.1, 53.6), arrayOf(160.0, 60.0),
|
||||
arrayOf(174.0, 73.6), arrayOf(162.6, 61.4), arrayOf(174.0, 55.5), arrayOf(162.6, 63.6), arrayOf(161.3, 60.9),
|
||||
arrayOf(156.2, 60.0), arrayOf(149.9, 46.8), arrayOf(169.5, 57.3), arrayOf(160.0, 64.1), arrayOf(175.3, 63.6),
|
||||
arrayOf(169.5, 67.3), arrayOf(160.0, 75.5), arrayOf(172.7, 68.2), arrayOf(162.6, 61.4), arrayOf(157.5, 76.8),
|
||||
arrayOf(176.5, 71.8), arrayOf(164.4, 55.5), arrayOf(160.7, 48.6), arrayOf(174.0, 66.4), arrayOf(163.8, 67.3)
|
||||
))))
|
||||
|
||||
}
|
||||
|
||||
fun polarChartMixedChart(): AAChartModel {
|
||||
return AAChartModel()
|
||||
.chartType(AAChartType.Column)
|
||||
.polar(true)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Column")
|
||||
.type(AAChartType.Column)
|
||||
.data(arrayOf(8, 7, 6, 5, 4, 3, 2, 1)),
|
||||
AASeriesElement()
|
||||
.name("Line")
|
||||
.type(AAChartType.Line)
|
||||
.data(arrayOf(1, 2, 3, 4, 5, 6, 7, 8)),
|
||||
AASeriesElement()
|
||||
.name("Area")
|
||||
.type(AAChartType.Area)
|
||||
.data(arrayOf(1, 8, 2, 7, 3, 6, 4, 5))
|
||||
))
|
||||
}
|
||||
|
||||
fun configurePieMixedLineMixedColumnChart(): AAChartModel {
|
||||
val columnElement1 = AASeriesElement()
|
||||
.name("Anna")
|
||||
.type(AAChartType.Column)
|
||||
.data(arrayOf(3, 2, 1, 3, 4))
|
||||
val columnElement2 = AASeriesElement()
|
||||
.name("Babara")
|
||||
.type(AAChartType.Column)
|
||||
.data(arrayOf(2, 3, 5, 7, 6))
|
||||
val columnElement3 = AASeriesElement()
|
||||
.name("Coco")
|
||||
.type(AAChartType.Column)
|
||||
.data(arrayOf(4, 3, 3, 9, 0))
|
||||
val lineElement = AASeriesElement()
|
||||
.name("average value")
|
||||
.type(AAChartType.Line)
|
||||
.data(arrayOf(3, 2.67, 3, 6.33, 3.33))
|
||||
.marker(AAMarker()
|
||||
.fillColor("#1E90FF")
|
||||
.lineWidth(2.0)
|
||||
.lineColor(AAColor.White
|
||||
))
|
||||
val pieElement = AAPie()
|
||||
.type(AAChartType.Pie)
|
||||
.center(arrayOf(100, 80))
|
||||
.size(100)
|
||||
.showInLegend(true)
|
||||
.dataLabels(AADataLabels()
|
||||
.enabled(false))
|
||||
.data(arrayOf(
|
||||
AADataElement()
|
||||
.name("Ada")
|
||||
.y(13.0)
|
||||
.color(AAGradientColor.OceanBlue)
|
||||
,
|
||||
AADataElement()
|
||||
.name("Bob")
|
||||
.y(13.0)
|
||||
.color(AAGradientColor.Sanguine)
|
||||
,
|
||||
AADataElement()
|
||||
.name("Coco")
|
||||
.y(13.0)
|
||||
.color(AAGradientColor.PurpleLake)
|
||||
))
|
||||
|
||||
return AAChartModel()
|
||||
.stacking(AAChartStackingType.Normal)
|
||||
.colorsTheme(arrayOf(
|
||||
"#fe117c", "#ffc069", "#06caf4", "#7dffc0"
|
||||
))
|
||||
.dataLabelsEnabled(false)
|
||||
.series(arrayOf(
|
||||
columnElement1,
|
||||
columnElement2,
|
||||
columnElement3,
|
||||
lineElement,
|
||||
pieElement
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
//GitHub issue https://github.com/AAChartModel/AAChartKit/issues/921
|
||||
fun configureNegativeColorMixedAreasplineChart(): AAChartModel {
|
||||
val blueStopsArr: Array<Any> = arrayOf(
|
||||
arrayOf(0.0, AARgba(30, 144, 255, 0.0f)),
|
||||
arrayOf(0.5, AARgba(30, 144, 255, 0.0f)),
|
||||
arrayOf(1.0, AARgba(30, 144, 255, 0.6f))
|
||||
)
|
||||
val gradientBlueColorDic = AAGradientColor.linearGradient(
|
||||
AALinearGradientDirection.ToTop,
|
||||
blueStopsArr
|
||||
)
|
||||
|
||||
val redStopsArr: Array<Any> = arrayOf(
|
||||
arrayOf(0.0, AARgba(255, 0, 0, 0.6f)),
|
||||
arrayOf(0.5, AARgba(255, 0, 0, 0.0f)),
|
||||
arrayOf(1.0, AARgba(255, 0, 0, 0.0f))
|
||||
)
|
||||
val gradientRedColorDic = AAGradientColor.linearGradient(
|
||||
AALinearGradientDirection.ToTop,
|
||||
redStopsArr
|
||||
)
|
||||
|
||||
return AAChartModel()
|
||||
.chartType(AAChartType.Area)
|
||||
.legendEnabled(false)
|
||||
.dataLabelsEnabled(false)
|
||||
.markerRadius(5)
|
||||
.markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
|
||||
.yAxisGridLineWidth(0)
|
||||
.series(arrayOf(
|
||||
AASeriesElement()
|
||||
.name("Column")
|
||||
.data(arrayOf(
|
||||
+7.0, +6.9, +2.5, +14.5, +18.2, +21.5, +5.2, +26.5, +23.3, +45.3, +13.9, +9.6,
|
||||
-7.0, -6.9, -2.5, -14.5, -18.2, -21.5, -5.2, -26.5, -23.3, -45.3, -13.9, -9.6
|
||||
))
|
||||
.lineWidth(5)
|
||||
.color(AARgba(30, 144, 255, 1.0f))
|
||||
.negativeColor(AARgba(255, 0, 0, 1.0f))
|
||||
.fillColor(gradientBlueColorDic)
|
||||
.negativeFillColor(gradientRedColorDic)
|
||||
.threshold(0) //default:0
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1052
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,34 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
@@ -0,0 +1,238 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/aaChartCoreThemeColor"
|
||||
tools:context=".basiccontent.BasicChartActivity">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="170dp"
|
||||
android:background="@color/aaChartCoreThemeColor"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/stackingTypeRadioGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/noStackingRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:text="noStacking" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/normalStackingRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:text="normalStacking" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/percentStackingRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:text="percentStacking" />
|
||||
</RadioGroup>
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cornerStyleTypeRadioGroup"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/squareCornersRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:text="square\ncorners" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/roundedCornersRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:text="rounded\ncorners" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/wedgeCornersRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:text="wedge\ncorners" />
|
||||
</RadioGroup>
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:id="@+id/markerSymbolTypeRadioGroup"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/circleSymbolRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="22dp"
|
||||
android:text="⬤⬤" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/squareSymbolRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="22dp"
|
||||
android:text="■■" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/diamondSymbolRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="22dp"
|
||||
android:text="◆◆" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/triangleSymbolRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="22dp"
|
||||
android:text="▲▲" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/triangleDownSymbolRadio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:textSize="22dp"
|
||||
android:text="▼▼" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Switch
|
||||
android:id="@+id/xReversedSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/yReversedSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/xInvertedSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/polarSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/dataShowSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/markerHideSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="xReversed"
|
||||
android:textColor="@color/mediumGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="yReversed"
|
||||
android:textColor="@color/mediumGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="xInverted"
|
||||
android:textColor="@color/mediumGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="polarization"
|
||||
android:textColor="@color/mediumGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="dataShow"
|
||||
android:textColor="@color/mediumGray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/markerHideTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/lightGray"
|
||||
android:text="markerHide" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
android:id="@+id/AAChartView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/aaChartCoreThemeColor" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".basiccontent.CustomStyleChartActivity">
|
||||
|
||||
|
||||
<com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
android:id="@+id/AAChartView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".additionalcontent.JSFormatterFunctionActivity">
|
||||
|
||||
|
||||
<com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
android:id="@+id/AAChartView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".additionalcontent.DoubleChartsLinkedWorkActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginLeft="1dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_marginRight="1dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
android:id="@+id/AAChartView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
android:id="@+id/AAChartView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".additionalcontent.DrawChartWithAAOptionsActivity">
|
||||
|
||||
<com.github.aachartmodel.aainfographics.aachartcreator.AAChartView
|
||||
android:id="@+id/AAChartView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".additionalcontent.EvaluateJSStringFunctionActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="137dp"
|
||||
android:layout_marginLeft="137dp"
|
||||
android:layout_marginTop="200dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".additionalcontent.HideOrShowChartSeriesActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="282dp"
|
||||
android:text="暂无内容"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".additionalcontent.JSFunctionForAAChartEventsActivity">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user