SparkLineLayout
Simple and lightweight library for drawing sparklines / graphs. Support markers and gradients.
Usage
Add it in your root build.gradle at the end of repositories:
Add the dependency
Or Maven
XML
XML Attributes
XML attributes | Description |
---|---|
s_line_color | Sets the line color |
s_line_second_color | Sets the secondary color of the line. Necessary for the gradient when s_gradient_line="true" |
s_line_thickness | Sets the line thickness |
s_line_bezier | Responsible for the curvature of the line. 0.5 is recommended for the curve, and 0 for straight lines. |
s_gradient_line | Enables or disables the gradient for the line. |
s_split_line | Enables or disables split line mode. When false, the parameters: s_split_ratio, s_split_left_color and s_split_right_color are ignored. |
s_split_ratio | Ratio of line sizes (from 0 to 1) |
s_split_left_color | Sets the color for the left line when s_split_line="true" |
s_split_right_color | Sets the color for the right line when s_split_line="true" |
s_marker_width | Sets the width of the marker. When s_marker_circle_style="true", it is responsible for the radius of the marker. |
s_marker_height | Responsible for the height of the marker. When s_marker_circle_style="true" ignored. |
s_marker_background_color | Sets the color of the marker. |
s_marker_border_color | Sets the color of the stroke. |
s_marker_border_size | Sets the stroke thickness. |
s_marker_circle_style | Switches marker mode to round. The default false, and the marker is square. |