echarts的3D柱状图

const industryColor = {
  type: 'linear',
  x: 1,
  y: 0,
  x2: 1,
  y2: 1,
  colorStops: [
    {
      offset: 0,
      color: '#30CCC2'
    },
    {
      offset: 0.8,
      color: 'rgba(9, 33, 63, 0.2)'
    }
  ]
};

const industryData = [22, 35, 30, 22, 60, 56];
var option = {
  backgroundColor: 'rgba(0, 0, 0, 0.6)',
  animation: false,
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow'
    }
  },
  grid: {
    left: '0%',
    right: '4%',
    bottom: '0%',
    top: '10px',
    containLabel: true
  },
  xAxis: {
    type: 'category',
    data: ['测试1', '测试2', '测试3', '测试4'],
    axisLabel: {
      color: '#E6F7FF'
    },
    axisLine: {
      show: true,
      lineStyle: {
        color: 'rgba(255, 255, 2555, 0.1)'
      }
    },
    axisTick: {
      show: false
    },
    animation: false
  },
  yAxis: {
    type: 'value',
    axisLabel: {
      color: '#E6F7FF'
    },
    splitLine: {
      show: true,
      lineStyle: {
        color: 'rgba(255,255,255,0.2)'
      }
    },
    animation: false
  },
  series: [
    {
      name: '测试1',
      type: 'bar',
      barWidth: 9,
      data: industryData,
      itemStyle: {
        //柱子左面
        normal: {
          // 重要的是color配置:线性渐变, 从上往下
          color: {
            type: 'linear',
            x: 1,
            y: 0,
            x2: 1,
            y2: 1,
            colorStops: [
              {
                offset: 0,
                color: '#30CCC2'
              },
              {
                offset: 0.8,
                color: 'rgba(9, 33, 63, 0.2)'
              }
            ]
          }
        }
      },
      tooltip: {
        show: false
      }
    },
    {
      name: '测试1',
      tooltip: {
        show: true,
        padding: 100,
        position: [-10, '50%'],
        borderWidth: 100
      },
      type: 'bar',
      barWidth: 13,
      barCategoryGap: '60%',
      itemStyle: {
        //柱子右面
        normal: {
          // 重要的是color配置:线性渐变, 从上往下
          color: industryColor,
          borderWidth: 0.3,
          borderColor: 'rgba(9, 36, 83, 0.1)'
        }
      },
      data: industryData,
      // 间隔为0
      barGap: 0,
      z: 5
    },
    {
      z: 10,
      name: '测试1',
      // 这里是柱子的顶部,type: "pictorialBar" 可以自定义图形或者使用内置选项
      type: 'pictorialBar',
      symbolPosition: 'end',
      data: industryData,
      symbol: 'diamond',
      symbolOffset: [0, -12],
      symbolRotate: 90,
      symbolSize: [10.5, 23],
      itemStyle: {
        normal: {
          borderWidth: 0,
          color: '#3BEDDE'
        }
      },
      tooltip: {
        show: false
      }
    }
  ]
};

在Java中添加水印和公章可以使用Java的图像处理库 - ImageIO和Graphics2D。下面是一个简单的示例代码,演示如何在一张图片上添加水印和公章: ```java import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import javax.imageio.ImageIO; public class AddWatermark { public static void main(String[] args) throws Exception { String imagePath = "test.jpg"; String watermarkPath = "watermark.png"; String sealPath = "seal.png"; BufferedImage image = ImageIO.read(new File(imagePath)); BufferedImage watermark = ImageIO.read(new File(watermarkPath)); BufferedImage seal = ImageIO.read(new File(sealPath)); Graphics2D g = image.createGraphics(); int watermarkWidth = image.getWidth() / 3; int watermarkHeight = watermarkWidth * watermark.getHeight() / watermark.getWidth(); g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, 0.5f)); g.drawImage(watermark, image.getWidth() - watermarkWidth, image.getHeight() - watermarkHeight, watermarkWidth, watermarkHeight, null); int sealWidth = image.getWidth() / 4; int sealHeight = sealWidth * seal.getHeight() / seal.getWidth(); g.drawImage(seal, image.getWidth() / 2 - sealWidth / 2, image.getHeight() / 2 - sealHeight / 2, sealWidth, sealHeight, null); g.dispose(); ImageIO.write(image, "jpg", new File("result.jpg")); } } ``` 这个示例代码加载了一张名为test.jpg的图片,以及两张水印和公章图片。它使用Graphics2D把水印和公章添加到原始图片上,并将结果保存到result.jpg文件中。 您也可以根据需要调整代码。希望这可以帮到您!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值