Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to make bottom line dashed?

I have SfCartesianChart and I want to make a bottom line dashed. How to make it?

enter image description here

This is my code:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

SfCartesianChart(
  plotAreaBorderWidth: 0,
  plotAreaBorderColor: Colors.white24,
  primaryXAxis: DateTimeAxis(
    majorGridLines: const MajorGridLines(
    width: 0.5,
    color: Colors.transparent,
    ),
  ),
  primaryYAxis: NumericAxis(
    majorGridLines: const MajorGridLines(width: 1, color: Colors.white24, dashArray: <double>[5, 5]),
      minimum: 0,
      maximum: 100
    ),
)

>Solution :

Have you tried playing with the dashArray property on the AxisLine? I.e.:

primaryXAxis: DateTimeAxis(
  majorGridLines: const MajorGridLines(
    width: 0.5,
    color: Colors.transparent,
    ),
  axisLine: AxisLine(
    color: Colors.red, 
    dashArray: <double>[2.0, 1.0],
  ),
),
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading