Hey guys, is it possible to create tachograph chart with your Flutter package? I am trying but i don't get too much success :D
Below you can see how that chart should look like, can you please tell me is this achievable?
https://cdn.discordapp.com/attachments/798262161892966420/964093987524841502/unknown.png
So on yAxis are statuses(String) and on xAxis are hours in 12 hours format.
Hi Aleksandar,
Greetings from Syncfusion. You can use the stepLineSeries to achieve the graph as you expected. As of now, the y axis did not support the categoryAxis (supports for numeric and log axes). So, you can pass the string values on the x-axis and enable the isTransposed property in the chart, then enable the opposedPosition property on the y-axis it will help you to achieve your requirement. We have attached a sample for your reference below.
UG: https://help.syncfusion.com/flutter/cartesian-charts/series-customization#transpose-the-series
Regards,
Yuvaraj.
Thank you very much, thats close but I was able to do this by myself, my concern is about 12hours format and overall design of a chart, is it possible to archive exact same design as provided in screenshot?
You dont need to create it, just give me a hint. :)
Hi Aleksandar,
You can achieve this with some customization, and we have provided some hints as per your requirement.
UG: https://help.syncfusion.com/flutter/cartesian-charts/callbacks#oncreaterenderer
If the x-axis with date-time values and y-axis with axisLabelFormatter callback doesn't work properly in your customization, then kindly stick to the solution which we have provided in our previous update.
Regards,
Yuvaraj.
Thanks for the reply, I have manage to made progress, but I am not there yet.
Can you help me and tell me how can this paint color always be on top, as you can see on picture, there is a strange bug where this blue Stepline is visible on yellow Paint.
Bug screenshot: https://cdn.discordapp.com/attachments/961550030173524021/966622297022664704/Screenshot_2022-04-21_at_10.49.37.png
My code: https://cdn.discordapp.com/attachments/961550030173524021/966622727190487080/Screenshot_2022-04-21_at_10.52.51.png
Hi Aleksandar,
We have analyzed your code snippet attached to the last query and found that you are calling the super in onPaint method. When calling the super.onPaint, it renders the default StepLineSeries again after your customer rendering is completed. So, please call the super before your custom renders or avoid calling the super in the onPaint method. This is the reason for StepLine get rendered on yellow paint.
If you have any further queries, please get back to us.
Regards,
Yuvaraj.