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

93
Views
How to style function-plot.js

Im using function-plot.js lib to draw some functions and I want to match the theme im using. I wnat to change grid,label's color but coudnt find proper documentaion.

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

0

To change the color of a function:

functionPlot({
  target: "#root",
  width,
  height,
  yAxis: { domain: [-1, 9] },
  grid: true,
  data: [
    {
      fn: "x^2",
      derivative: {
        fn: "2 * x",
        updateOnMouseMove: true
      },
      color: "32cb74" // add a color value
    },
    {fn: "x+1", color: "#ffffff"},
  ]
});

this can be any hex value.


You can style the grid, background, etc. in a css file. Example:

.function-plot {
 background: #fafafa // background color of the whole graph
}

.x.axis .tick line {
 stroke: aqua; // color of the vertical lines
}

To get the css selectors you can inspect the graph using devtools.

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!