Code Monkey home page Code Monkey logo

Comments (4)

pearmini avatar pearmini commented on May 31, 2024

还是可以渐变的,只不过需要调整一下参数:

import { Liquid } from '@antv/g2plot';

const liquidPlot = new Liquid('container', {
  percent: 0.25,
  outline: {
    border: 4,
    distance: 8,
  },
  wave: {
    count: 8,
    length: 128,
  },
  liquidStyle: {
    fill: 'l(180) 0.2:#ff0000 0.8:#61a8ff',
    stroke:
      'l(90) 0.01:#61a8ff 0.82:rgba(28, 129, 255, 0) 0.08:rgba(28, 129, 255, 0.75)',
    show: true,
    shadowColor: '#1c47ff',
    shadowBlur: 36,
    shadowOffsetX: 0,
    shadowOffsetY: 0,
  },
});

liquidPlot.render();

from g2plot.

97702573 avatar 97702573 commented on May 31, 2024

你给我的,和我给你的fill颜色不一样呀。我的fill是: l(180) 0:#B4EC51 1:#429321

from g2plot.

97702573 avatar 97702573 commented on May 31, 2024

@pearmini

from g2plot.

pearmini avatar pearmini commented on May 31, 2024

@97702573 你自己调整一下 #B4EC5 和 #429321 前面的数值

from g2plot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.