Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

106
Views
how to use fillOpacity below to PlotLine in highchart?

I am using the below code to plot a line parallel to x-axis

chart.yAxis[0].addPlotLine({
  color: "#7cb5ec",
  id: "plotline",
  value: 700,
  width: 1,
});

please check the below screenshot.

enter image description here

But I want to fill the area below the line i.e. as in the below screenshot.

enter image description here

How Can I do this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use a plot band instead of a plotline and define color as linear gradient:

chart.yAxis[0].addPlotBand({
    color: {
        linearGradient: {
            x1: 0,
            x2: 0,
            y1: 0,
            y2: 1
        },
        stops: [
            [0, '#696ec7'],
            [1, '#c4c4c4']
        ]
    },
    from: 0,
    to: 700
});

Live demo: http://jsfiddle.net/BlackLabel/w0hy3z6e/

Docs: https://www.highcharts.com/docs/chart-design-and-style/colors

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!