添加暂态事件波形图后台绘图并保存文件服务器
This commit is contained in:
@@ -11,6 +11,7 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -56,6 +57,28 @@ public class DrawPicUtil {
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 绘制波形图
|
||||
* @author hongawen
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawWavePic(String title, List<List<Float>> aValue, List<List<Float>> bValue, List<List<Float>> cValue, String unit, Float max, Float min, String a, String b, String c, List<String> colors, Boolean isOpen) {
|
||||
return drawWavePic(title, aValue, bValue, cValue, unit, max, min, a, b, c, colors, isOpen, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
* 绘制波形图
|
||||
* @author hongawen
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawWavePic(String title, List<List<Float>> aValue, List<List<Float>> bValue, List<List<Float>> cValue, String unit, Float max, Float min, String a, String b, String c, List<String> colors, Boolean isOpen, int width, int height) {
|
||||
String instantJson = LineGenerator.generateWaveOption(title, aValue, bValue, cValue, unit, max, min, a, b, c, colors, isOpen);
|
||||
return drawPic(instantJson, width, height);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 绘制itic曲线图
|
||||
* @author hongawen
|
||||
@@ -152,7 +175,7 @@ public class DrawPicUtil {
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawMonth(List<String> xName, List<Integer> times, String year, Integer flag) {
|
||||
return drawMonth(xName, times, year, flag, 0, 0);
|
||||
return drawMonth(xName, times, year, flag, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -162,7 +185,7 @@ public class DrawPicUtil {
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawMonth(List<String> xName, List<Integer> times, String year, Integer flag, int width, int height) {
|
||||
String monthJson = BarGenerator.generateMonthOption( xName, times, year, flag);
|
||||
String monthJson = BarGenerator.generateMonthOption(xName, times, year, flag);
|
||||
return drawPic(monthJson, width, height);
|
||||
}
|
||||
|
||||
@@ -172,8 +195,8 @@ public class DrawPicUtil {
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawReason(List<String> xname, List<Map<String,Object>> map2) {
|
||||
return drawReason(xname, map2, 0, 0);
|
||||
public String drawReason(List<String> xname, List<Map<String, Object>> map2) {
|
||||
return drawReason(xname, map2, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -182,8 +205,8 @@ public class DrawPicUtil {
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawReason(List<String> xname, List<Map<String,Object>> map2, int width, int height) {
|
||||
String monthJson = PieGenerator.generateReasonOption(xname, map2);
|
||||
public String drawReason(List<String> xname, List<Map<String, Object>> map2, int width, int height) {
|
||||
String monthJson = PieGenerator.generateReasonOption(xname, map2);
|
||||
return drawPic(monthJson, width, height);
|
||||
}
|
||||
|
||||
@@ -193,8 +216,8 @@ public class DrawPicUtil {
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawType(List<String> xname, List<Map<String,Object>> map2) {
|
||||
return drawType(xname, map2, 0, 0);
|
||||
public String drawType(List<String> xname, List<Map<String, Object>> map2) {
|
||||
return drawType(xname, map2, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -203,8 +226,8 @@ public class DrawPicUtil {
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawType(List<String> xname, List<Map<String,Object>> map2, int width, int height) {
|
||||
String monthJson = PieGenerator.generateTypeOption(xname, map2);
|
||||
public String drawType(List<String> xname, List<Map<String, Object>> map2, int width, int height) {
|
||||
String monthJson = PieGenerator.generateTypeOption(xname, map2);
|
||||
return drawPic(monthJson, width, height);
|
||||
}
|
||||
|
||||
@@ -237,7 +260,7 @@ public class DrawPicUtil {
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventRegion(List<String> xData, List<Integer> yData) {
|
||||
return drawEventRegion(xData,yData, 0, 0);
|
||||
return drawEventRegion(xData, yData, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -247,7 +270,7 @@ public class DrawPicUtil {
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventRegion(List<String> xData, List<Integer> yData, int width, int height) {
|
||||
String eventDensityJson = LineGenerator.generateRegionOption(xData,yData);
|
||||
String eventDensityJson = LineGenerator.generateRegionOption(xData, yData);
|
||||
return drawPic(eventDensityJson, width, height);
|
||||
}
|
||||
|
||||
@@ -258,7 +281,7 @@ public class DrawPicUtil {
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventAssociatedUnassociated(List<String> eventValue, List<Integer> pereventValue, List<Integer> pereventValue1, String xName) {
|
||||
return drawEventAssociatedUnassociated(eventValue,pereventValue,pereventValue1,xName, 0, 0);
|
||||
return drawEventAssociatedUnassociated(eventValue, pereventValue, pereventValue1, xName, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -268,7 +291,7 @@ public class DrawPicUtil {
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventAssociatedUnassociated(List<String> eventValue, List<Integer> pereventValue, List<Integer> pereventValue1, String xName, int width, int height) {
|
||||
String eventDensityJson = LineGenerator.generateAssociatedUnassociatedOption(eventValue,pereventValue,pereventValue1,xName);
|
||||
String eventDensityJson = LineGenerator.generateAssociatedUnassociatedOption(eventValue, pereventValue, pereventValue1, xName);
|
||||
return drawPic(eventDensityJson, width, height);
|
||||
}
|
||||
|
||||
@@ -279,7 +302,7 @@ public class DrawPicUtil {
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventVoltageLevel(List<String> xData, List<Integer> yData) {
|
||||
return drawEventVoltageLevel(xData,yData, 0, 0);
|
||||
return drawEventVoltageLevel(xData, yData, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -289,7 +312,7 @@ public class DrawPicUtil {
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventVoltageLevel(List<String> xData, List<Integer> yData, int width, int height) {
|
||||
String eventDensityJson = LineGenerator.generateVoltageLevelOption(xData,yData);
|
||||
String eventDensityJson = LineGenerator.generateVoltageLevelOption(xData, yData);
|
||||
return drawPic(eventDensityJson, width, height);
|
||||
}
|
||||
|
||||
@@ -299,8 +322,8 @@ public class DrawPicUtil {
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventRegionDevice(List<String> xData, List<Integer> onlineData,List<Integer> offlineData,String subtext,String xName) {
|
||||
return drawEventRegionDevice(xData,onlineData,offlineData,subtext,xName, 0, 0);
|
||||
public String drawEventRegionDevice(List<String> xData, List<Integer> onlineData, List<Integer> offlineData, String subtext, String xName) {
|
||||
return drawEventRegionDevice(xData, onlineData, offlineData, subtext, xName, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -309,8 +332,8 @@ public class DrawPicUtil {
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventRegionDevice(List<String> xData, List<Integer> onlineData,List<Integer> offlineData,String subtext,String xName, int width, int height) {
|
||||
String eventDensityJson = LineGenerator.generateRegionDeviceOption(xData,onlineData,offlineData,subtext,xName);
|
||||
public String drawEventRegionDevice(List<String> xData, List<Integer> onlineData, List<Integer> offlineData, String subtext, String xName, int width, int height) {
|
||||
String eventDensityJson = LineGenerator.generateRegionDeviceOption(xData, onlineData, offlineData, subtext, xName);
|
||||
return drawPic(eventDensityJson, width, height);
|
||||
}
|
||||
|
||||
@@ -320,8 +343,8 @@ public class DrawPicUtil {
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventFrequency(List<String> xData, List<Integer> dip,List<Integer> interruptions,List<Integer> rise,String subtext,String xName) {
|
||||
return drawEventFrequency(xData,dip,interruptions,rise,subtext,xName, 0, 0);
|
||||
public String drawEventFrequency(List<String> xData, List<Integer> dip, List<Integer> interruptions, List<Integer> rise, String subtext, String xName) {
|
||||
return drawEventFrequency(xData, dip, interruptions, rise, subtext, xName, 0, 0);
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -330,8 +353,10 @@ public class DrawPicUtil {
|
||||
* @date 2023/6/21 11:01
|
||||
* @return String base64数据
|
||||
*/
|
||||
public String drawEventFrequency(List<String> xData, List<Integer> dip,List<Integer> interruptions,List<Integer> rise,String subtext,String xName, int width, int height) {
|
||||
String eventDensityJson = LineGenerator.generateFrequencyOption(xData,dip,interruptions,rise,subtext,xName);
|
||||
public String drawEventFrequency(List<String> xData, List<Integer> dip, List<Integer> interruptions, List<Integer> rise, String subtext, String xName, int width, int height) {
|
||||
String eventDensityJson = LineGenerator.generateFrequencyOption(xData, dip, interruptions, rise, subtext, xName);
|
||||
return drawPic(eventDensityJson, width, height);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user