I was looking at https://www.b4x.com/android/help/mpchartlib.html#linechart and was wondering if it is possible to insert new graph data when a button is pressed. One odd thing that I found in this and other graphs, I cannot mention any particular coordinate on a graph, unlike matplotlib. I am looking for a way to draw a graph and then placing (or appending new coordinates) to the graph when a user presses a button, the plot points (x and y values) could be in an array, when a button is pressed, new coordinates are appended to the existing plot.
I also found this interesting https://www.b4x.com/android/forum/t...ta-passed-from-b4a-project.61521/#post-388909 but I cannot understand how to exactly pass new (X and Y axis data). In fact I could not understand how to set both X axis range and Y axis range at the same time and yet pass new coordinates. Please help me here.
I am attaching a sample graph which I made in python, I am looking for something like it.
In that graph, I can change the pointer's location (the one with "+" symbol) by feeding new data (x, y values) from input boxes.
I can also plot line graph from one location to the other, by appending two x,y values one after another.
I looked a lot for an example in this forum which would even slightly resemble what I am trying to do, but I could not find.
I also found this interesting https://www.b4x.com/android/forum/t...ta-passed-from-b4a-project.61521/#post-388909 but I cannot understand how to exactly pass new (X and Y axis data). In fact I could not understand how to set both X axis range and Y axis range at the same time and yet pass new coordinates. Please help me here.
I am attaching a sample graph which I made in python, I am looking for something like it.
In that graph, I can change the pointer's location (the one with "+" symbol) by feeding new data (x, y values) from input boxes.
I can also plot line graph from one location to the other, by appending two x,y values one after another.
I looked a lot for an example in this forum which would even slightly resemble what I am trying to do, but I could not find.
Last edited: