Hello everyone, i need to wrap this Graph Plotting library, I know that a user by the name of XverHelstX
has already wrapped this library but is a paid library, I need to wrap this library for a work project i'm currently working on, anyhow what I need help is figuring out how to pass the X and Y parameters to the graph in an array. this is the java code used to add the datapoints to the graph!
As you guys can see this datapoints are fixed, I need to figure out how to pass different values all the time, for example if I'm reading the voltage via bluetooth i'd like to pass an array of values to the code above.
and this is how the graphview is added:
Any Help and all advices on how to go around this will be greatly appreciated.
Thanks All!
Walter
has already wrapped this library but is a paid library, I need to wrap this library for a work project i'm currently working on, anyhow what I need help is figuring out how to pass the X and Y parameters to the graph in an array. this is the java code used to add the datapoints to the graph!
B4X:
exampleseries = new GraphViewSeries(new GraphViewData[]{
new GraphViewData(1, 1.0)
, new GraphViewData(2, 1.5d)
, new GraphViewData(2.5, 3.0d) // another frequency
, new GraphViewData(3, 2.5d)
, new GraphViewData(4, 1.0d)
, new GraphViewData(5, 3.0d)
});
As you guys can see this datapoints are fixed, I need to figure out how to pass different values all the time, for example if I'm reading the voltage via bluetooth i'd like to pass an array of values to the code above.
and this is how the graphview is added:
B4X:
public static LineGraphView AddGraph(BA ba, String GraphTitle){
graphview = new LineGraphView(ba.context, GraphTitle);
graphview.addSeries(exampleseries);
return graphview;
}}
Thanks All!
Walter