f0raster0 Well-Known Member Licensed User Longtime User Dec 13, 2023 #1 Hello Team, We're in search of a chart that allows for scrolling, similar to the example provided below. Thanks in advance. Edit: Link the closer one supporting horizontal scrolling is this: MPAndroidCharts - Various type of graphs / charts (Latest library V1.22 in post #1) Edit 6 Sep 2015: Post #3 adds Single Vertical Bar Charts and update for Pie Charts Edit 8 Sep 2015 Post #6 update for Single Vertical Bar Charts Edit 11 Sep 2015 Post #7 adds Single Line Charts Edit 12 Sep 2015 Post #8 update for Single Line Charts Edit 12 Sep 2015 Post #9 adds Single Horizontal... www.b4x.com Last edited: Dec 13, 2023
Hello Team, We're in search of a chart that allows for scrolling, similar to the example provided below. Thanks in advance. Edit: Link the closer one supporting horizontal scrolling is this: MPAndroidCharts - Various type of graphs / charts (Latest library V1.22 in post #1) Edit 6 Sep 2015: Post #3 adds Single Vertical Bar Charts and update for Pie Charts Edit 8 Sep 2015 Post #6 update for Single Vertical Bar Charts Edit 11 Sep 2015 Post #7 adds Single Line Charts Edit 12 Sep 2015 Post #8 update for Single Line Charts Edit 12 Sep 2015 Post #9 adds Single Horizontal... www.b4x.com
klaus Expert Licensed User Longtime User Dec 15, 2023 #2 Maybe the xChart library could do it. A small demo program does exist HERE. It uses a Line chart with two lines updated dynamically, with a scrollbar. It has a checkbox to allow scrolling. Upvote 0
Maybe the xChart library could do it. A small demo program does exist HERE. It uses a Line chart with two lines updated dynamically, with a scrollbar. It has a checkbox to allow scrolling.
f0raster0 Well-Known Member Licensed User Longtime User Dec 15, 2023 #3 klaus said: Maybe the xChart library could do it. A small demo program does exist HERE. It uses a Line chart with two lines updated dynamically, with a scrollbar. It has a checkbox to allow scrolling. Click to expand... Thanks, @klaus. We're currently utilizing the xChart library. I've tested almost all the demos from your threads, except that one, unfortunately, it doesn't run on my phone. I've tried both xChart 9.8 and an older version. Today, I gave it another shot, and here's the error log. Any thoughts on what might be causing the issue? Error Demo not touching: Edit: It compiles now. Q#2 (I believe I've already read that it cannot be done) Do you know if it is possible to change the color of the dots upon clicking, reaching the maximum value, or both options? Q#3 - How can I capture the value when clicking on a data point? Last edited: Dec 15, 2023 Upvote 0
klaus said: Maybe the xChart library could do it. A small demo program does exist HERE. It uses a Line chart with two lines updated dynamically, with a scrollbar. It has a checkbox to allow scrolling. Click to expand... Thanks, @klaus. We're currently utilizing the xChart library. I've tested almost all the demos from your threads, except that one, unfortunately, it doesn't run on my phone. I've tried both xChart 9.8 and an older version. Today, I gave it another shot, and here's the error log. Any thoughts on what might be causing the issue? Error Demo not touching: Edit: It compiles now. Q#2 (I believe I've already read that it cannot be done) Do you know if it is possible to change the color of the dots upon clicking, reaching the maximum value, or both options? Q#3 - How can I capture the value when clicking on a data point?
klaus Expert Licensed User Longtime User Dec 16, 2023 #4 1. Sorry, i had tested it only with B4J. Attached the B4XPages project also with B4A. 2. No, it cannot be done. Attachments DynamicZoom3.zip DynamicZoom3.zip 338.7 KB · Views: 341 Upvote 0
1. Sorry, i had tested it only with B4J. Attached the B4XPages project also with B4A. 2. No, it cannot be done.
klaus Expert Licensed User Longtime User Dec 17, 2023 #5 3. The display panel for the values is hidden every time when a new value is added. This could be avoided, modifying the code in the class. But this work correctly only as long as the max. number of data is not reached. Because all values at a given position in the list remain the same. But, when the number max of data is reached and a new data arrives, the first one is removed and the new is added. This means that, when you allow the zoom cursor and the screen is frozen, the real values at a given position in the list change with each new data arriving. To be able to read the frozen data, it would need two sets of data, the current data and the frozen data. Upvote 0
3. The display panel for the values is hidden every time when a new value is added. This could be avoided, modifying the code in the class. But this work correctly only as long as the max. number of data is not reached. Because all values at a given position in the list remain the same. But, when the number max of data is reached and a new data arrives, the first one is removed and the new is added. This means that, when you allow the zoom cursor and the screen is frozen, the real values at a given position in the list change with each new data arriving. To be able to read the frozen data, it would need two sets of data, the current data and the frozen data.
f0raster0 Well-Known Member Licensed User Longtime User Dec 17, 2023 #6 @klaus you chart work great! We successfully retrieve the value upon clicking a point. The only feature we currently lack for our requirements is Zoom In/Out (when we stop reading data), but for the time being, it meets our needs - maybe one day B4X will have some chart like post#1 Once again thank you very much! Upvote 0
@klaus you chart work great! We successfully retrieve the value upon clicking a point. The only feature we currently lack for our requirements is Zoom In/Out (when we stop reading data), but for the time being, it meets our needs - maybe one day B4X will have some chart like post#1 Once again thank you very much!
klaus Expert Licensed User Longtime User Dec 17, 2023 #7 f0raster0 said: The only feature we currently lack for our requirements is Zoom In/Out (when we stop reading data) Click to expand... What exactly do you mean with "when we stop reading data" ? Does it mean that you do not add new data during this time ? If yes, this can easily be done. Or do you want to continue to acquire new data and freeze the data to display ? This will need two data set as explained in my previous post. Upvote 0
f0raster0 said: The only feature we currently lack for our requirements is Zoom In/Out (when we stop reading data) Click to expand... What exactly do you mean with "when we stop reading data" ? Does it mean that you do not add new data during this time ? If yes, this can easily be done. Or do you want to continue to acquire new data and freeze the data to display ? This will need two data set as explained in my previous post.
klaus Expert Licensed User Longtime User Dec 17, 2023 #8 Attached two projects: In DynamicZoom3 you can stops the data acquisition to allow zooming and reading data. When you read again, the data which come during the stop time are lost. In DynamicZoom4 you can freeze the currently acquired data to allow zooming and reading these data, but the data acquisition continues. This uses two data lists. When you 'unfreeze' the data you get the latest acquired data. Attachments DynamicZoom3.zip DynamicZoom3.zip 338.9 KB · Views: 341 DynamicZoom4.zip DynamicZoom4.zip 338.9 KB · Views: 344 Upvote 0
Attached two projects: In DynamicZoom3 you can stops the data acquisition to allow zooming and reading data. When you read again, the data which come during the stop time are lost. In DynamicZoom4 you can freeze the currently acquired data to allow zooming and reading these data, but the data acquisition continues. This uses two data lists. When you 'unfreeze' the data you get the latest acquired data.
f0raster0 Well-Known Member Licensed User Longtime User Dec 17, 2023 #9 klaus said: What exactly do you mean with "when we stop reading data" ? Does it mean that you do not add new data during this time ? If yes, this can easily be done. Click to expand... We are retrieving data from a Bluetooth module, and we can control the Bluetooth module to stop sending data, then the chart stops receiving new data. Consequently, the current data displayed on the chart can be observed, and further navigation by scrolling left and right is achievable using your chart functionality. I understand that in your example, "zooming" refers to moving left/right. We would appreciate having the option to Zoom In/Out, as below: Upvote 0
klaus said: What exactly do you mean with "when we stop reading data" ? Does it mean that you do not add new data during this time ? If yes, this can easily be done. Click to expand... We are retrieving data from a Bluetooth module, and we can control the Bluetooth module to stop sending data, then the chart stops receiving new data. Consequently, the current data displayed on the chart can be observed, and further navigation by scrolling left and right is achievable using your chart functionality. I understand that in your example, "zooming" refers to moving left/right. We would appreciate having the option to Zoom In/Out, as below: