最近通过poi实现了一整套由 07版excel生成折线图、柱状图及混合双轴图形,本文将记录折线图中的关于图例、标题、坐标轴的各种样式。其中包括颜色、字体、粗细、虚实等。直接上代码吧

package com.ai.util.excel.chart.export;import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.streaming.SXSSFRow;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFChart;
import java.awt.Color;import org.apache.poi.xssf.usermodel.XSSFColor;
import org.apache.xmlbeans.XmlBoolean;
import org.openxmlformats.schemas.drawingml.x2006.chart.*;
import org.openxmlformats.schemas.drawingml.x2006.main.*;import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;/*** Created by LCK-XM on 2020/9/16.*  自动生成折线图,支持样式自定义*/
public class ExcelLineChartDemo {private static SXSSFWorkbook wb = new SXSSFWorkbook();private SXSSFSheet sheet = null;public static void main(String[] args) { // 字段名// 标题List<String> titleArr = new ArrayList<String>();//行别   2013年  2014年  2015年  2016年  2017上半年    2017年  2018上半年    2018年  2019上半年    2019年  2020上半年titleArr.add("行别");titleArr.add("2013年");titleArr.add("2014年");titleArr.add("2015年");titleArr.add("2016年");titleArr.add("2017上半年");titleArr.add("2017年");titleArr.add("2018上半年");titleArr.add("2018年");titleArr.add("2019上半年");titleArr.add("2019年");titleArr.add("2020上半年");// 模拟数据List<Map<String, Object>> dataList = intData();String fileName = "模拟数据";ExcelLineChartDemo demo  = new ExcelLineChartDemo() ;try {// 创建折线图demo.createTimeXYChar(titleArr, dataList,fileName);//导出到文件String savePath ="D:/excel/chart/"+fileName+"_" + System.currentTimeMillis() + ".xlsx" ;FileOutputStream out = new FileOutputStream(new File(savePath));wb.write(out);out.close();System.out.println(savePath);
//            Runtime.getRuntime().exec("cmd /c start  "+savePath);
//       Runtime.getRuntime().exec("rundll32 url.dll FileProtocolHandler   "+savePath);} catch (IOException e) {e.printStackTrace();}}/*** 创建折线图** @throws IOException*/public void createTimeXYChar(List<String> titleArr,  List<Map<String, Object>> dataList,String fileName) {sheet = wb.createSheet(fileName);boolean result = drawSheetMap(sheet, dataList, titleArr);System.out.println("生成折线图-->" + result);}/*** 生成折线图** @param sheet*            页签* @param dataList*            填充数据* @param titleArr*            图例标题* @return*/private boolean drawSheetMap(SXSSFSheet sheet, List<Map<String, Object>> dataList, List<String> titleArr) {boolean result = false;// 获取sheet名称String sheetName = sheet.getSheetName();result = drawSheet0Table(sheet, titleArr, dataList);// 创建一个画布Drawing<?> drawing = sheet.createDrawingPatriarch();// 画一个图区域// 前四个默认0,开始列 开始行 结束列 结束行ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 1, dataList.size()+3, 15,dataList.size()+25);// 创建一个chart对象XSSFChart chart =(XSSFChart) drawing.createChart(anchor);CTChart ctChart =chart.getCTChart();CTPlotArea ctPlotArea = ctChart.getPlotArea();//设置画布边框样式CTChartSpace space = chart.getCTChartSpace();space.addNewRoundedCorners().setVal(false);//去掉圆角//设置图表位置//CTManualLayout manualLayout = chart.getManualLayout().getCTManualLayout();/*// 设置图表标题 setting chart title((XSSFChart) chart).setTitleText("图表Demo");// 标题的位置(于图表上方或居中覆盖)ctChart.getTitle().addNewOverlay().setVal(false);ctChart.addNewShowDLblsOverMax().setVal(true);CTTitle tt  = ctChart.addNewTitle();ctChart.setTitle(tt);*///设置标题方法2CTTitle ctTitle = ctChart.addNewTitle();ctTitle.addNewOverlay().setVal(false);// true时与饼图重叠ctTitle.addNewTx().addNewRich().addNewBodyPr();CTTextBody rich = ctTitle.getTx().getRich();rich.addNewLstStyle();CTRegularTextRun newR = rich.addNewP().addNewR();newR.setT(sheetName);  //标题名称newR.addNewRPr().setB(false);XmlBoolean xmlBoolean = XmlBoolean.Factory.newInstance();xmlBoolean.setBooleanValue(false);newR.getRPr().xsetB(xmlBoolean);//是否加粗 0不加粗 1加粗newR.getRPr().setLang("zh-CN");newR.getRPr().setAltLang("en-US");newR.getRPr().setSz(800);//字体大小newR.getRPr().addNewLatin().setTypeface("楷体");newR.getRPr().getLatin().setCharset((byte) -122);newR.getRPr().getLatin().setPitchFamily((byte)49);newR.getRPr().addNewEa().setTypeface("楷体");newR.getRPr().getEa().setCharset((byte) -122);newR.getRPr().getEa().setPitchFamily((byte)49);// 单元格没有数据时,该点在图表上为0或不显示或跳过直接连接ctChart.addNewDispBlanksAs().setVal(STDispBlanksAs.SPAN);//是否添加左侧坐标轴ctChart.addNewShowDLblsOverMax().setVal(true);// 折线图CTLineChart ctLineChart = ctPlotArea.addNewLineChart();
//        CTLineChart ctLineChart2 = ctPlotArea.addNewLineChart();CTBoolean ctBoolean = ctLineChart.addNewVaryColors();ctLineChart.addNewGrouping().setVal(STGrouping.STANDARD);// 创建序列,并且设置选中区域for (int i = 1; i < dataList.size() ; i++) {CTLineSer ctLineSer = ctLineChart.addNewSer();CTSerTx ctSerTx = ctLineSer.addNewTx();// 图例区CTStrRef ctStrRef = ctSerTx.addNewStrRef();String legendDataRange = new CellRangeAddress( i, i, 0, 0).formatAsString(sheetName, true);ctStrRef.setF(legendDataRange);ctLineSer.addNewIdx().setVal(i);// 横坐标区CTAxDataSource cttAxDataSource = ctLineSer.addNewCat();ctStrRef = cttAxDataSource.addNewStrRef();String axisDataRange = new CellRangeAddress(0, 0, 1, titleArr.size()).formatAsString(sheetName, true);ctStrRef.setF(axisDataRange);// 数据区域CTNumDataSource ctNumDataSource = ctLineSer.addNewVal();CTNumRef ctNumRef = ctNumDataSource.addNewNumRef();// 选第1-6行,第1-3列作为数据区域 //1 2 3//23456String numDataRange = new CellRangeAddress(i,i , 2,6).formatAsString(sheetName, true);System.out.println(numDataRange);ctNumRef.setF(numDataRange);// 设置标签格式ctBoolean.setVal(false);CTDLbls newDLbls = ctLineSer.addNewDLbls();newDLbls.setShowLegendKey(ctBoolean);ctBoolean.setVal(true);newDLbls.setShowVal(ctBoolean);ctBoolean.setVal(false);newDLbls.setShowCatName(ctBoolean);newDLbls.setShowSerName(ctBoolean);newDLbls.setShowPercent(ctBoolean);newDLbls.setShowBubbleSize(ctBoolean);newDLbls.setShowLeaderLines(ctBoolean);// 是否是平滑曲线CTBoolean addNewSmooth = ctLineSer.addNewSmooth();addNewSmooth.setVal(false);// 是否是堆积曲线?CTMarker addNewMarker = ctLineSer.addNewMarker();CTMarkerStyle markerStyle = addNewMarker.addNewSymbol();//NONE-无 CIRCLE-实心圆圈 STAR-星号  DASH-实线 DIAMOND-方块(菱形) DOT-点 PLUS-加号 SQUARE-正方形 TRIANGLE-三角形 X-XmarkerStyle.setVal(STMarkerStyle.CIRCLE);//设置线条颜色STHexBinary3 hex = STHexBinary3.Factory.newInstance();hex.setStringValue("5555FF");CTShapeProperties ctShapeProperties = ctLineSer.addNewSpPr();CTLineProperties lineProperties = ctShapeProperties.addNewLn();CTSolidColorFillProperties properties = lineProperties.addNewSolidFill();CTSRgbColor rgbColor = properties.addNewSrgbClr();rgbColor .xsetVal(hex);//设置线条粗细lineProperties.setW(20000);//设置线条类型 虚线 实线CTPresetLineDashProperties ctPresetLineDashProperties = lineProperties.addNewPrstDash();ctPresetLineDashProperties.setVal(STPresetLineDashVal.LG_DASH);}//告诉条形图它有轴并给它们IDint xAxisId = dataList.size() + 1 + 10000;int yAxisId = dataList.size() + 2 + 10000;ctLineChart.addNewAxId().setVal(xAxisId);ctLineChart.addNewAxId().setVal(yAxisId);//==========================================// 设置x轴属性Boolean isXAxisDelete =false ;CTCatAx ctCatAx = ctPlotArea.addNewCatAx();ctCatAx.addNewAxId().setVal(xAxisId);ctCatAx.addNewCrossAx().setVal(yAxisId);CTScaling ctScaling = ctCatAx.addNewScaling();ctScaling.addNewOrientation().setVal(STOrientation.MIN_MAX);  //X轴排列方向ctCatAx.addNewDelete().setVal(isXAxisDelete);// 是否隐藏x轴ctCatAx.addNewAxPos().setVal(STAxPos.B);// x轴位置(左右上下)ctCatAx.addNewMajorTickMark().setVal(STTickMark.OUT);// 主刻度线在轴上的位置(内、外、交叉、无)ctCatAx.addNewMinorTickMark().setVal(STTickMark.NONE);// 次刻度线在轴上的位置(内、外、交叉、无)ctCatAx.addNewAuto().setVal(true);ctCatAx.addNewLblAlgn().setVal(STLblAlgn.CTR);ctCatAx.addNewTickLblPos().setVal(STTickLblPos.NEXT_TO);// 标签(即刻度文字)的位置(轴旁、高、低、无)ctCatAx.addNewSpPr().addNewLn().addNewSolidFill().addNewSrgbClr().setVal( new XSSFColor(new Color(58, 76, 78)).getRGB());// x轴颜色,有两种方式设置颜色
//        STHexBinary3 hex_x = STHexBinary3.Factory.newInstance();
//        hex_x.setStringValue("5555FF");
//        ctCatAx.addNewSpPr().addNewLn().addNewSolidFill().addNewSrgbClr().xsetVal(hex_x);
//         ctCatAx.addNewCrosses().setVal(STCrosses.MIN);   //X轴以Y轴的最小值或最大值穿过Y轴//设置X轴字体/*<c:txPr><a:bodyPr/><a:lstStyle/><a:p><a:pPr><a:defRPr baseline="0" sz="800"><a:ea charset="-122" pitchFamily="49" typeface="楷体"/></a:defRPr></a:pPr><a:endParaRPr lang="zh-CN"/></a:p></c:txPr>*/ctCatAx.addNewTxPr().addNewBodyPr();ctCatAx.getTxPr().addNewLstStyle();CTTextCharacterProperties properties = ctCatAx.getTxPr().addNewP().addNewPPr().addNewDefRPr();properties.setBaseline(0);properties.setSz(800);//字体大小properties.addNewEa().setTypeface("楷体");
//        properties.getEa().setCharset((byte) -122);
//        properties.getEa().setPitchFamily((byte)49);ctCatAx.getTxPr().getPList().get(0).addNewEndParaRPr().setLang("zh-CN");//===========================================// 设置y轴属性CTValAx ctValAx = ctPlotArea.addNewValAx();ctValAx.addNewAxId().setVal(yAxisId);ctValAx.addNewCrossAx().setVal(xAxisId);ctScaling = ctValAx.addNewScaling();ctScaling.addNewOrientation().setVal(STOrientation.MIN_MAX);  //Y轴排列方向ctValAx.addNewDelete().setVal(false);// 是否隐藏y轴char  yAxisPosition = 'L';switch (yAxisPosition) {// y轴位置(左右上下)case 'L' :ctValAx.addNewAxPos().setVal(STAxPos.L);ctValAx.addNewCrosses().setVal(STCrosses.MIN);// 纵坐标交叉位置(最大、最小、0、指定某一刻度),也可不用设置,此处如果设置为MAX,则上面设置的左侧失效break;case 'R' :ctValAx.addNewAxPos().setVal(STAxPos.R);ctValAx.addNewCrosses().setVal(STCrosses.MAX);break;case 'T' :ctValAx.addNewAxPos().setVal(STAxPos.T);break;case 'B' :ctValAx.addNewAxPos().setVal(STAxPos.B);break;default :ctValAx.addNewAxPos().setVal(STAxPos.L);ctValAx.addNewCrosses().setVal(STCrosses.MIN);break;}ctValAx.addNewMajorTickMark().setVal(STTickMark.OUT);// 主刻度线在轴上的位置(内、外、交叉、无)ctValAx.addNewMinorTickMark().setVal(STTickMark.NONE);// 次刻度线在轴上的位置(内、外、交叉、无)ctValAx.addNewTickLblPos().setVal(STTickLblPos.NEXT_TO);// 标签(即刻度文字)的位置(轴旁、高、低、无)
//        ctValAx.addNewSpPr().addNewLn().addNewSolidFill().addNewSrgbClr().setVal( new XSSFColor(new Color(255, 76, 105)).getRGB());// x轴颜色,有两种方式设置颜色STHexBinary3 hex_y = STHexBinary3.Factory.newInstance();hex_y.setStringValue("5555FF");ctValAx.addNewSpPr().addNewLn().addNewSolidFill().addNewSrgbClr().xsetVal(hex_y);
//        ctValAx.addNewMajorGridlines().addNewSpPr().addNewLn().addNewSolidFill().addNewSrgbClr().setVal(new XSSFColor(new Color(134, 134, 134)).getRGB());// 显示主要网格线,并设置颜色ctScaling = ctValAx.addNewScaling() ;ctScaling.addNewMin().setVal(10);// 设置纵坐标最小值ctScaling.addNewMax().setVal(100);// 设置纵坐标最大值//设置纵坐标标题
//        ctValAx.addNewTitle().addNewTx().addNewStrRef()
//        .setF(new CellRangeAddress(0, 0, 0, 0).formatAsString(sheet.getSheetName(), true));//图例/* <c:legend><c:legendPos val="b"/><c:layout/><c:txPr><a:bodyPr/><a:lstStyle/><a:p><a:pPr><a:defRPr baseline="0" sz="800"><a:ea charset="-122" pitchFamily="49" typeface="楷体"/></a:defRPr></a:pPr><a:endParaRPr lang="zh-CN"/></a:p></c:txPr></c:legend>*/CTLegend legend = ctChart.addNewLegend();legend.addNewLegendPos().setVal(STLegendPos.B);//图例位置legend.addNewOverlay().setVal(false);legend.addNewTxPr().addNewBodyPr();legend.getTxPr().addNewLstStyle();CTTextCharacterProperties legendProps = legend.getTxPr().addNewP().addNewPPr().addNewDefRPr();legendProps.setBaseline(0);legendProps.setSz(800);//字体大小legendProps.addNewEa().setTypeface("楷体");legendProps.getEa().setCharset((byte) -122);legendProps.getEa().setPitchFamily((byte)49);legend.getTxPr().getPList().get(0).addNewEndParaRPr().setLang("zh-CN");return result;}/*** 生成数据表** @param sheet*            sheet页对象* @param titleArr*            表头字段* @param dataList*            数据* @return 是否生成成功*/private boolean drawSheet0Table(SXSSFSheet sheet, List<String> titleArr,  List<Map<String, Object>> dataList) {// 测试时返回值boolean result = true;// 初始化表格样式List<CellStyle> styleList = tableStyle();// 根据数据创建excel第一行标题行SXSSFRow row0 = sheet.createRow(0);for (int i = 0; i < titleArr.size(); i++) {// 设置标题row0.createCell(i).setCellValue(titleArr.get(i));// 设置标题行样式row0.getCell(i).setCellStyle(styleList.get(0));}// 填充数据2for (int i = 0; i < dataList.size(); i++) {// 获取每一项的数据Map<String, Object> data = dataList.get(i);// 设置每一行的字段标题和数据SXSSFRow rowi = sheet.createRow(i + 1);for (int j = 0; j < data.size(); j++) {// 判断是否是标题字段列if (j == 0) {rowi.createCell(j).setCellValue((String) data.get("value" + (j + 1)));// 设置左边字段样式sheet.getRow(i + 1).getCell(j).setCellStyle(styleList.get(0));} else {rowi.createCell(j).setCellValue(Double.valueOf((String) data.get("value" + (j + 1))));// 设置数据样式sheet.getRow(i + 1).getCell(j).setCellStyle(styleList.get(2));}}}return result;}/*** 生成表格样式** @return*/private static List<CellStyle> tableStyle() {List<CellStyle> cellStyleList = new ArrayList<CellStyle>();// 样式准备// 标题样式2CellStyle style = wb.createCellStyle();style.setFillForegroundColor(IndexedColors.GREEN.getIndex());style.setFillPattern(FillPatternType.SOLID_FOREGROUND);style.setBorderBottom(BorderStyle.THIN); // 下边框style.setBorderLeft(BorderStyle.THIN);// 左边框style.setBorderTop(BorderStyle.THIN);// 上边框style.setBorderRight(BorderStyle.THIN);// 右边框style.setAlignment(HorizontalAlignment.CENTER);cellStyleList.add(style);CellStyle style1 = wb.createCellStyle();style1.setBorderBottom(BorderStyle.THIN); // 下边框style1.setBorderLeft(BorderStyle.THIN);// 左边框style1.setBorderTop(BorderStyle.THIN);// 上边框style1.setBorderRight(BorderStyle.THIN);// 右边框style1.setAlignment(HorizontalAlignment.CENTER);cellStyleList.add(style1);CellStyle cellStyle = wb.createCellStyle();cellStyle.setBorderTop(BorderStyle.THIN);// 上边框cellStyle.setBorderBottom(BorderStyle.THIN); // 下边框cellStyle.setBorderLeft(BorderStyle.THIN);// 左边框cellStyle.setBorderRight(BorderStyle.THIN);// 右边框cellStyle.setAlignment(HorizontalAlignment.CENTER);// 水平对齐方式// cellStyle.setVerticalAlignment(VerticalAlignment.TOP);//垂直对齐方式cellStyleList.add(cellStyle);return cellStyleList;}private  static  List<Map<String, Object>>  intData() {// 模拟数据
//        工行   21.92% 19.96% 17.10% 15.24% 15.69% 14.35% 15.33% 13.79% 14.41% 13.05% 11.70%    6  6                          工行 -2.71%    富国 -3.23%                            工行 -2.71%    富国 -16.22%
//        建行   21.23% 19.74% 17.27% 15.44% 17.09% 14.80% 16.66% 14.04% 15.62% 13.18% 12.65%    4  2                          建行 -2.97%    汇丰 2.40%                             建行 -2.97%    摩根 -10.00%
//        中行   18.04% 17.28% 14.53% 12.58% 15.20% 12.24% 15.29% 12.06% 14.56% 11.45% 11.10%    11 9                          中行 -3.46%    花旗 3.80%                             中行 -3.46%    汇丰 -8.00%
//        农行   20.89% 19.57% 16.79% 15.14% 16.74% 14.57% 16.72% 13.66% 14.57% 12.43% 11.94%    7  5                          农行 -2.63%    美银 5.67%                             农行 -2.63%    花旗 -6.00%List<Map<String, Object>> dataList = new ArrayList<Map<String, Object>>();Map<String, Object> dataMap1 = new HashMap<String, Object>();dataMap1.put("value1", "工行");dataMap1.put("value2",  getRandom());dataMap1.put("value3",  getRandom());dataMap1.put("value4",  getRandom());dataMap1.put("value5",  getRandom());dataMap1.put("value6",  getRandom());dataMap1.put("value7",  getRandom());dataMap1.put("value8",  getRandom());dataMap1.put("value9",  getRandom());dataMap1.put("value10",  getRandom());dataMap1.put("value11",  getRandom());dataMap1.put("value12",  getRandom());Map<String, Object> dataMap2 = new HashMap<String, Object>();dataMap2.put("value1", "建行");dataMap2.put("value2",  getRandom());dataMap2.put("value3",  getRandom());dataMap2.put("value4",  getRandom());dataMap2.put("value5",  getRandom());dataMap2.put("value6",  getRandom());dataMap2.put("value7",  getRandom());dataMap2.put("value8",  getRandom());dataMap2.put("value9",  getRandom());dataMap2.put("value10",  getRandom());dataMap2.put("value11",  getRandom());dataMap2.put("value12",  getRandom());Map<String, Object> dataMap3 = new HashMap<String, Object>();dataMap3.put("value1", "中行");dataMap3.put("value2",  getRandom());dataMap3.put("value3",  getRandom());dataMap3.put("value4",  getRandom());dataMap3.put("value5",  getRandom());dataMap3.put("value6",  getRandom());dataMap3.put("value7",  getRandom());dataMap3.put("value8",  getRandom());dataMap3.put("value9",  getRandom());dataMap3.put("value10",  getRandom());dataMap3.put("value11",  getRandom());dataMap3.put("value12",  getRandom());Map<String, Object> dataMap4 = new HashMap<String, Object>();dataMap4.put("value1", "农行");dataMap4.put("value2",  getRandom());dataMap4.put("value3",  getRandom());dataMap4.put("value4",  getRandom());dataMap4.put("value5",  getRandom());dataMap4.put("value6",  getRandom());dataMap4.put("value7",  getRandom());dataMap4.put("value8",  getRandom());dataMap4.put("value9",  getRandom());dataMap4.put("value10",  getRandom());dataMap4.put("value11",  getRandom());dataMap4.put("value12",  getRandom());Map<String, Object> dataMap5 = new HashMap<String, Object>();dataMap5.put("value1", "交行");dataMap5.put("value2",  getRandom());dataMap5.put("value3",  getRandom());dataMap5.put("value4",  getRandom());dataMap5.put("value5",  getRandom());dataMap5.put("value6",  getRandom());dataMap5.put("value7",  getRandom());dataMap5.put("value8",  getRandom());dataMap5.put("value9",  getRandom());dataMap5.put("value10",  getRandom());dataMap5.put("value11",  getRandom());dataMap5.put("value12",  getRandom());Map<String, Object> dataMap6 = new HashMap<String, Object>();dataMap6.put("value1", "邮储");dataMap6.put("value2",  getRandom());dataMap6.put("value3",  getRandom());dataMap6.put("value4",  getRandom());dataMap6.put("value5",  getRandom());dataMap6.put("value6",  getRandom());dataMap6.put("value7",  getRandom());dataMap6.put("value8",  getRandom());dataMap6.put("value9",  getRandom());dataMap6.put("value10",  getRandom());dataMap6.put("value11",  getRandom());dataMap6.put("value12",  getRandom());dataList.add(dataMap1);dataList.add(dataMap2);dataList.add(dataMap3);dataList.add(dataMap4);dataList.add(dataMap5);dataList.add(dataMap6);return dataList;}public static   String getRandom(){Double value= Math.random()*100;return  String.format("%.2f", value).toString();}
}

Excel通过poi设置折线图样式相关推荐

  1. 1、【Echarts系列】Vue中设置echarts折线图样式(图表、网格、标签、提示、标题、文字),手把手教程系列

    一.echarts 折线图(折线统计图) 折线图在我们也是我们的数据可视化图表中最常用的一种图表之一,是用折线将各个数据点标志连接起来的图表,不仅可以表示数量的多少,而且可以反映同一事物在不同时间里的 ...

  2. Apache POI 生成折线图+柱状图设置双Y轴并导出word文档

    实际项目中遇到的问题,相关信息实在较少,怕自己忘记,菜鸟记录一下 我设置的是双Y轴的组和图表.左侧为折线图Y轴,右侧为柱状图Y轴. 直接上代码. // An highlighted block pub ...

  3. Java使用POI生成折线图导出到word文档(折线图)

    本篇文章主要介绍,如何使用Apache POI组件生成折线图导出到word文档中,具体步骤看下文. 一.实现效果 Java使用POI技术生成折线图导出到word文档中,最终生成的折线图如下所示: 二. ...

  4. 计算机二级word插入图表,四步教你在excel柱形图上添加折线图

    相信很多小伙伴都已经知道如何建立Excel柱形图,但对于在excel柱形图上添加折线图大家又会不会呢?在excel柱形图上添加折线图能让我们的图表更加清晰,而且这还是一个提问率非常高的Excel图表问 ...

  5. python做动态折线图_python matplotlib折线图样式实现过程

    python matplotlib 同时画箱线图和折线图的问题 python3 matplotlib画两个折线图,X轴相同,Y轴生...你的memo和cpui里面是字符串,不是数字 将memo.app ...

  6. 在 Echarts 中设置折线图x轴文字的倾斜度

    在 Echarts 中设置折线图x轴文字的倾斜度 在工作需求中,有需要把 Echarts 折线图的文字变成倾斜的样式.类似这样的: 这个功能咋实现? 很简单.加一句话就行了 // 配置项 option ...

  7. 超全的echarts折线图样式整理

    超全的echarts折线图样式整理 本次记录了echarts的折线颜色修改.自定义展示折线最后一个数值内容.自定义折线内容颜色.自定义折线图缩放展示.x轴线条粗细调整.x轴箭头单箭头调整.y轴线条粗细 ...

  8. java使用poi绘制折线图和饼图(用数据绘制和使用excel生成的表格数据)

    完整代码在码云地址: https://gitee.com/Min-Duck/line_chart.git 多线折线图 单线折线图 饼图 工具类 import com.gideon.entity.Cha ...

  9. echarts折线图设置圆点_echarts 设置折线图单个数据小圆圈样式

    在使用echarts 折线图时,可能会遇到针对不同的数据显示不同的小圆点样式,经过查看echarts配置项,其中data中有一个value配置项选项,可以单独设置某一个数据的显示样式,具体使用方式如下 ...

最新文章

  1. POJ-1041 John's trip
  2. mongoDB 介绍(特点、优点、原理)
  3. python构造和析构_python魔法方法 构造和析构实例讲解
  4. OBIEE打补丁教程
  5. putil:一个用于获得处理器和系统相关信息的模块
  6. 【HDU - 6016】Count the Sheep (思维,类似二分图)
  7. ASPNetCore MVC ModelValidation-ajax
  8. Layout inflation的正确使用
  9. 罗马数字java代码实现_6.2 罗马数字转整数
  10. 高斯消去法(Gauss)的python实现
  11. cocosCreator 骨骼动画
  12. 看到强烈的太阳光你会不由自主的打喷嚏吗?
  13. python第三方库matplotlib绘制简单折线图
  14. 用 python 合并不同传感器返回的轴承信号小波变换时频图
  15. 36 数字组合(Combination Sum)
  16. 基于uni-app实现微信小程序一键登录和退出登录功能
  17. 如何提取抖音短视频中的音乐
  18. Go 语言是互联网时代的 C 语言?
  19. WaveTone 2.67原创汉化版扒谱辅助教程
  20. 智慧农业解决方案:温室大棚远程监控

热门文章

  1. Swiper Social项目(一): Swiper Social项⽬概览及项⽬⽬标(类似于探探)
  2. 工业物联网解决方案:PLC数据上云
  3. MyEclipse如何配置Tomcat
  4. php twig中文手册,安装 · Twig 中文文档 · 看云
  5. 【Linux设置系统时间】
  6. FlexRay™ 协议控制器 (E-Ray)-04
  7. 解决Android v4、v7包导入标红问题import android.support.v4.app.ActivityCompat;import android.support.v7.app
  8. PHP连接redis并执行redis相关命令的方法详解
  9. rda分析怎么做_数量生态学笔记||冗余分析(RDA)
  10. win10更新后office2016图标显示空白