Home > Back-end >  Chart according to the Y value, outside a range set the fill color [for]
Chart according to the Y value, outside a range set the fill color [for]

Time:10-23



Suppose Y value in more than 10, less than 5, fill in the value outside the area of color,

O solve,

CodePudding user response:

D the original chart without this function, only the read from a control, or the painting,

CodePudding user response:

If is the drawing out of the line, the starting point of curve, the inflection point and end point coordinates should be know, according to these points can be calculated for each section of the slope of line, two lateral linear Y know, according to the slope should be able to calculate the intersection point of the X coordinates, so that closed of triangle three vertex coordinates have, then calls the filling method of graphical component filling is ok, no specific writing code, this way of thinking should be feasible,

CodePudding user response:

Using Rgn area to do, can build a regional coordinates, and then use FillRgn

CodePudding user response:

The
refer to the original poster glite response:


Suppose Y value in more than 10, less than 5, fill in the value outside the area of color,

O solve,

The building Lord, this problem solved? Could you tell me, to solve

CodePudding user response:

Need to rewrite MPAndroidChart LineChartRenderer class drawLinearFill method, generate its own filling filling path can
Refer to the article
https://www.jianshu.com/p/ba548bd3d4ecThe effect of the individual to

CodePudding user response:

Do you have the source code
  • Related