B4J Library [B4X] [XUI] xChart Class and b4xlib

klaus

Expert
Licensed User
Longtime User
I tested the demo program with 3000 and it works OK it shows always 20 samples and the time is OK.
I check Allow Zoom Cursor and scroll back, it only shows 1 minute 30 seconds chart!!! and sometimes less or more!!!
So, I do not understand what happens to you.
 
I tested the demo program with 3000 and it works OK it shows always 20 samples and the time is OK.

So, I do not understand what happens to you.
Oh sorry as I could not explain in well manner. As you said it is OK with 3000 and 20 samples always are visible with time stamp OK. Now after some time there should be memory buffer with 3000 readings. When 3001 comes the first is removed from buffer and it always maintains 3000 readings.
Now I Click on checkbox Allow Zoom Cursor and chart stops to update. Then I move Scroll bar cursor to left end and the first time stamp is only approximately 1 minute and 30 seconds before the last stamp. In other words it only shows chart for one and half minute by scrolling with mouse to left.
When update time is 100ms so every seconds there are 10 readings and even after 5 minutes there are only 900 reading to show instead of 3000. Thanks.
 

klaus

Expert
Licensed User
Longtime User
Sorry, but i do not understand what you are doing.
I tested the program with 50ms data update.
Do you use the demo program i posted in post #657 or anything else ?
Now I Click on checkbox Allow Zoom Cursor and chart stops to update.
Yes, the chart is not updated, but the data is updated.
When Allow Zoom Cursor is checked and you have the zoom cursor at the most left position or anywhere else and you slightly move the cursor the chart is updated with the last data.
Sorry, but I do not understand what exactly you are expecting ?

Attached my latest test program.
I tested also to update the data, lines 75 and 76, in the chart when Allow Zoom Cursor is checked, it updates the data where ever you are with the zoom cursor, but i find it very confusing.

 

Attachments

  • DynamicZoom2.zip
    166.4 KB · Views: 256
Last edited:

klaus

Expert
Licensed User
Longtime User
The xChart library has been updated to version 9.8.
Changed SetZoomIndexes Zoom.EndIndex not limited to previous Zoom.EndIndex
Set zoom min cursor width from 10dip to 15dip
The first change allows zooming with dynamic data input and move the zoom cursor at the end.
Demo program for dynamic data and zoom.
 

madru

Active Member
Licensed User
Longtime User
Hi, maybe I missed it, but is it possible to display the values for a STACKED_BAR?

THX
 

peacemaker

Expert
Licensed User
Longtime User
For ref: if think that useful - can be included:
B4X:
Public Sub GetBitmap As B4XBitmap
    Return mBase.Snapshot   
End Sub

I use it for saving the chart to PNG.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…