您好,我全部使用laravel 5.7,我想使用图表。我是 安装ConsoleTVs / Charts作曲家软件包
我收到此异常
“未找到'ConsoleTVs \ Charts \ Facades \ Charts'类”'
答案 0 :(得分:0)
一个建议,但是您是否在文件顶部使用名称空间?
像Map<String, DataPosition> excelIds = new HashMap<>();
DataPosition position;
// Start at -2 so when it comes to the first value, you add 2 to place the column number to 0
Integer currentColNum = -2;
Integer currentRowNum = 1;
HSSFRow row;
for (DataClass e: getdata) {
position = excelIds.get(e.getDeviceId());
if (position != null) {
// Add a new row
position.rowNum++;
currentRowNum = position.rowNum;
} else {
// Add a new column (increments by two because you need two columns for the representation)
currentColNum += 2;
currentRowNum = 1;
excelIds.put(e.getDeviceId(), new DataPosition(currentColNum, currentRowNum));
}
row = sheet.getRow(currentRowNum);
if (row == null) {
row = sheet.createRow(currentRowNum);
}
row.createCell(currentColNum).setCellValue(e.getValue());
row.createCell(currentColNum + 1).setCellValue(e.getDate());
}