B4J Question Real-time chart shift

rtek1000

Active Member
Licensed User
Longtime User
I would like to know if there is a simple way to make the image change of a more elaborate chart, such as those made with the framework:

https://www.b4x.com/android/forum/threads/charts-framework.34710/#content

I was able to do it with canvas, but it is very simple and laborious to do the subtitles

B4X:
    ' Scrolls the image
    Canvas1.DrawImage2(Canvas1.Snapshot, 0, 0, Canvas1.Width - 5, Canvas1.Height, 5, 0, Canvas1.Width - 5, Canvas1.Height)
   
    ' Clean start area
    Canvas1.ClearRect(0, 0, 5, Canvas1.Height)
   
    ' Draw start area
    Canvas1.DrawLine(0, Num1, 5, lastPoint, fx.Colors.Red, 1)
           
    ' Save last point
    lastPoint = Num1


chart1.png
chart2.png
 

Attachments

  • B4J_Draw_Chart.zip
    3.3 KB · Views: 231
Top