| | |
| | | package com.hdl.photovoltaic.ui.home; |
| | | |
| | | |
| | | import static com.hdl.photovoltaic.ui.powerstation.aachart.CustomStyleChartComposer.configureColorfulColumnChart; |
| | | import static com.hdl.photovoltaic.ui.home.aachart.CustomStyleChartComposer.configureColorfulColumnChart; |
| | | |
| | | import android.os.Bundle; |
| | | import android.text.TextUtils; |
| | |
| | | import com.hdl.photovoltaic.ui.bean.DataOverBean; |
| | | import com.hdl.photovoltaic.ui.bean.SocialContributionBean; |
| | | import com.hdl.photovoltaic.ui.bean.StatisticsBean; |
| | | import com.hdl.photovoltaic.ui.powerstation.aachart.BasicChartComposer; |
| | | import com.hdl.photovoltaic.ui.home.aachart.BasicChartComposer; |
| | | import com.hdl.photovoltaic.utils.TimeUtils; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | |
| | |
| | | |
| | | FragmentHomePageBinding viewBinding; |
| | | |
| | | AAChartView aaChartView; |
| | | AutoSizeMyAAChart aaChartView; |
| | | |
| | | AAChartModel aaChartModel; |
| | | |
| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | | initEvent(); |
| | | //读取数据 |
| | | readDate(); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 读取数据 |
| | |
| | | readDate(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * 图表加载 |
| | | */ |
| | | private void setUpAAChartView() { |
| | | aaChartView = viewBinding.AAChartView; |
| | | aaChartView = viewBinding.autoSizeMyAAChart; |
| | | aaChartView.callBack = this; |
| | | if (TimeType.day.equals(timeType)) { |
| | | aaChartModel = BasicChartComposer.configureAreaChart("Pv发电功率", fieldNames, fieldValues); |
| | |
| | | aaChartModel = configureColorfulColumnChart("Pv发电功率", fieldNames, fieldValues); |
| | | } |
| | | aaChartView.aa_drawChartWithChartModel(aaChartModel); |
| | | |
| | | } |
| | | |
| | | private void initView() { |