代码调整
This commit is contained in:
@@ -530,16 +530,16 @@ public class LineGenerator {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: App越线指标图(单相)
|
||||
* @param title 标题
|
||||
* @param values 数据值
|
||||
* @param limitName 限制值标题
|
||||
* @param limit 限制值
|
||||
* @Description: App越线指标图(单相)
|
||||
* @return: java.lang.String
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/6 11:38
|
||||
*/
|
||||
public static String generateSteadyTargetOption(String title,Map<String ,List<List<Object>>> values,String limitName,List<List<Object>> limit) {
|
||||
public static String generateSteadyTargetOption(String title, Map<String, List<List<Object>>> values, String limitName, List<List<Object>> limit) {
|
||||
Option persistentTimeOption = new Option();
|
||||
//取消渲染动画
|
||||
persistentTimeOption.setAnimation(false);
|
||||
@@ -559,11 +559,11 @@ public class LineGenerator {
|
||||
.setName("(时间)")
|
||||
.setBoundaryGap(false)
|
||||
);
|
||||
persistentTimeOption.setColor(new String[]{"#CCC","#A0522D"});
|
||||
Integer max=0;
|
||||
if(CollUtil.isNotEmpty(limit)){
|
||||
Integer num = (Integer)limit.get(0).get(1);
|
||||
max=(int)(num * 0.2) + num;
|
||||
persistentTimeOption.setColor(new String[]{"#CCC", "#A0522D"});
|
||||
Integer max = 0;
|
||||
if (CollUtil.isNotEmpty(limit)) {
|
||||
Integer num = (Integer) limit.get(0).get(1);
|
||||
max = (int) (num * 0.2) + num;
|
||||
}
|
||||
//纵坐标
|
||||
persistentTimeOption.setYAxis(new ValueAxis()
|
||||
@@ -571,8 +571,8 @@ public class LineGenerator {
|
||||
.setMin(0).setMax(max)
|
||||
.setNameTextStyle(new AxisNameTextStyle().setFontStyle("15px"))
|
||||
);
|
||||
List<SeriesOption> list=new ArrayList<>();
|
||||
values.forEach((key,value)->{
|
||||
List<SeriesOption> list = new ArrayList<>();
|
||||
values.forEach((key, value) -> {
|
||||
LineSeries proportion = new LineSeries()
|
||||
.setName(key)
|
||||
.setType("line")
|
||||
|
||||
Reference in New Issue
Block a user