Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

95
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda