Primefaces - Is it possible to change the chartline chart color?

Asked

Viewed 355 times

1

Use primefaces 5.2 and I have the following chart: inserir a descrição da imagem aqui

what I would like to do is to leave the part below the line, in blue, but I have not found anything similar on the web, someone knows if this is possible and how to do it?

1 answer

1


You can customize almost all elements using only CSS statements. Try it this way:

canvas.jqplot-series-canvas {
    background: rgba(65, 143, 199, 0.11);
}

I made an example using the showcase do primefaces. Here is a screenshot of the result:

inserir a descrição da imagem aqui

Updating

After more detailed explanation of the problem, it was verified that the solution is the use of another type of graph, known as gráfico de área.

  • Romulo, the problem is that I want to change this color independent of the points, is a dynamic graph, I want to leave it blue below the line always, this is possible?

  • from what I understand you’re changing the color only to specific points.

  • Did you ever take the test? this element represents the entire chart background. if it’s not exactly what you need, send an image to better illustrate

  • It’s a reservoir chart, I want the part below the line to turn blue. But only the part below the line, this to represent the water.

  • @Jason You probably chose the wrong type of chart then. I believe the most interesting for your case is using the gráfico de area

  • Really Romulo.

  • @Romulo I suggest updating your answer with the suggestion of another type of chart. You have no problem doing that, because not always the best answer is the one that literally answers what you were asked.

  • @Jason Welcome to [en.so]! If Romulo’s answer helped you solve the problem, don’t forget to mark the answer as right. In addition to securing some reputation points for both, you help others who visit this question in the future to know that the problem has been solved.

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.