moxiaov587 / ecg_chart

A package for drawing ECG.
Other
0 stars 0 forks source link

Feature #1

Open abinash1220 opened 4 months ago

abinash1220 commented 4 months ago

I am using this graph to plot real time ecg data for patient and it's working out of the box and now i need a feature to do like graph looks like ecg pattern like it needs to maintain a small gap between lines is there any way to do this?

moxiaov587 commented 4 months ago

Like a dotted line? Can u provide some pictures?

abinash1220 commented 4 months ago

Like a dotted line? Can u provide some pictures? WhatsApp Image 2024-03-11 at 11 44 08 PM like this, i want to achieve a gap similar to this.

Mohd-ajmal commented 2 months ago

Hi!, is there any possibility to do like if otherAnimationCtrl was already drawn then while we going to push data with slidableAnimationCtrl here can we clear data's of otherAnimationCtrl with slidableAnimationCtrl position which means if half of the slidableAnimationCtrl is filled we have to clear half of the otherAnimationCtrl's data. Is it possible to do this?

moxiaov587 commented 1 month ago

Hey everyone, sorry for the wait. I make a new package.

Now your can import it with

ecg_chart:
    git:
      url: https://github.com/moxiaov587/ecg_chart.git
      ref: 3ddd2a7

This is example.

Since I don't have a use case for a production environment, you can give me some feedback after using it. If this package can cover your use case, I will publish it to pub.

Mohd-ajmal commented 1 month ago

Hey bro!, sorry for delay got some commitments so well, everything is good but the problem is i didn't see much crisp and accuracy like this that i mentioned here https://github.com/moxiaov587/slidable_line_chart/issues/16#issuecomment-2035882898 accuracy is more important to show ecg and one more thing, as you can see more ecg plots in single frame i am mentioning the arc which is i plotted nearly 7 to 8 ecg graph in a single line but i didn't do that here which is more important. i will tell you how i am getting data and in which speed also it will applicable for most of the BLE ecg device you can make according to this. so, i will get nearly 0 to 40 data for every 0.5 seconds which is 500 milli-second. the crucial thing is we should plot this 60 data's before the next data comes which is exactly like should plot 40 point within 500 milli-seconds and 60 data also is not constant i may get any length within 0 to 40 maximum is 40 that will not change. so this is the use case then i will give you some sample data for you to test.

sample data's :- [-341.0, -322.0, -270.0, -257.0, -198.0, -217.0, -175.0, 174.0, 257.0, 151.0, -31.0] [1838.0, 1766.0, 1666.0, 1583.0, 1489.0, 1412.0, 1335.0, 1257.0, 1228.0, 1119.0, 1094.0, 1200.0, 1307.0, 1174.0, 1010.0, 810.0, 770.0, 703.0, 659.0, 542.0, 1154.0, 3100.0, 4725.0, 1097.0, -1.0] [570.0, 498.0, 483.0, 455.0, 497.0, 612.0, 820.0, 1210.0, 1467.0, 1520.0, 1402.0, 1050.0, 660.0, 578.0, 504.0, 463.0, 452.0, 434.0, 400.0, 379.0, 352.0, 335.0, 325.0] [43.0, 186.0, 266.0, 119.0, -101.0, -101.0, -123.0, -123.0, -118.0, -118.0, -377.0, 1616.0, 3855.0, 3547.0, -1705.0, -929.0, -725.0, -697.0, -663.0, -655.0, -553.0, -450.0, -159.0, 225.0, 419.0, 497.0] [5192.0, 4782.0, 4314.0, 3625.0, 3410.0, 3224.0, 3120.0, 3027.0, 2915.0, 2819.0, 2732.0, 2628.0, 2541.0, 2452.0, 2378.0, 2290.0, 2223.0, 2350.0, 2417.0, 2305.0, 2101.0, 1833.0, 1768.0, 1711.0, 1646.0, 1561.0, 1947.0, 4156.0, 6114.0, 2696.0, 457.0, 572.0, 539.0, 531.0, 503.0, 536.0] [230.0, 515.0, 850.0, 1001.0, 1031.0, 830.0, 390.0, 182.0, 130.0, 113.0, 101.0, 84.0, 81.0] [303.0, 271.0, 234.0, 236.0, 185.0, 163.0, 155.0, 311.0, 391.0, 355.0, 196.0, -29.0, 185.0, -41.0, -71.0, -92.0, -120.0, 153.0, 2111.0, 3954.0, 1222.0, -920.0, -886.0, -890.0, -862.0] [-144.0, -22.0, 146.0, 452.0, 870.0, 1003.0, 1064.0, 909.0, 395.0, 236.0, 196.0, 184.0, 179.0, 190.0, 191.0, 188.0, 182.0, 182.0, 183.0, 183.0, 183.0, 176.0, -22.0, 330.0, 476.0, 498.0] [-298.0, -525.0, -469.0, -471.0, -442.0, -487.0, -11.0, 1868.0, 3849.0, 761.0, -1031.0, -1020.0, -1001.0, -956.0, -892.0, -837.0, -715.0, -520.0, -164.0, 232.0, 395.0, 426.0, -176.0, -251.0]

Here each array generated for every 500 milli-seconds, hope you got the point. Below i will mention how i got the plotting using the new package for your reference.

https://github.com/moxiaov587/slidable_line_chart/assets/90542307/b2b38674-4828-412a-a12a-19b63d120793

the thing we need to change is will need to plot more ecg arcs in single line and need more accuracy like i mention in slidable_line_package but that gap is really really good other than this everything is good. thank you for your work and dedication.

moxiaov587 commented 1 month ago

There seem to be a lot of problems:>

I think you think the biggest problem now is that there are too few points on one screen, right?

You can control the number through ECGChartThemeData.pointsGap, you can set a smaller value.

If possible, you can make a list of the problems you encounter and describe them more clearly, which can reduce some communication costs.