I use a chart library called MPAndroidChart and I am very pleased with it. However, I want to draw a thick vertical line (as a background, not as data), which serves as an indicator in the middle of the line chart. How can i do this?
Sincerely.
You can use the LimitLine class to do this.
LimitLine
Basically, this class allows you to draw a custom string at a specified position along the y axis in the diagram and add a description to it.
After creating the string, you need to assign it to XAxis or YAxis .
XAxis
YAxis
See the documentation for more details. You can find the limit values ββat the bottom of the page.
In addition, in this example, the class shows how to use them: https://github.com/PhilJay/MPAndroidChart/blob/master/MPChartExample/src/com/xxmassdeveloper/mpchartexample/LineChartActivity1.java
UPDATE : now LimitLines can be assigned to any axis!
You can draw vertical lines on a chart using the Highlight class. See fooobar.com/questions/555331 / ...
Source: https://habr.com/ru/post/983695/More articles:Avoid scientific notation in the cut function in R - rGet parent node of child in WPF C # TreeView - c #Unexpected behavior with loop macro and closures - common-lispHow did you find out whether the main one came out? - c ++Java SE 6 and Java SE 8 JRE behave differently in Windows 7 (file permissions) - javaHow to set function arguments in assembly at run time in a 64-bit application on Windows? - cOnsen-UI using a sliding menu with a navigator - androidWhy re.match ()? - pythonUsing the same list with threads twice in Java - javaSurrogate int, float and decimal with Json.NET - jsonAll Articles