Nov 11, 2017 Replies: 7 This is a wrap for this Github project: https://github.com/robinhood/spark Spark Author: Version: 1.0 Functions: getItem (index As Int) As Object getX (arg0 As Int) As Float getY (index As Int) As Float hasBaseLine As Boolean notifyDataSetChanged notifyDataSetInvalidated randomize registerDataSetObserver (arg0 As android.database.DataSetObserver) unregisterDataSetObserver (arg0 As android.database.DataSetObserver) Properties: BaseLine As Float [read only] Count As Int [read only] Data As Float() [write only] DataBounds As android.graphics.RectF [read only] SparkView Events: onScrubbed (value As Object) Fields: ba As BA Functions: BringToFront DesignerCreateView (base As Panel, lw As Label, props As Map) getScaledX (x As Float) As Float Get the scaled (pixel) coordinate of your given x value. If no scale is currently computed (for instance {@link SparkAdapter} has not been set or has less than 2 points of data). This method will return the unscaled value. x: the value to scale (should be the same units as your graph's data points) Return type: @return:the pixel coordinates of where this point is located in SparkView's bounds getScaledY (y As Float) As Float Get the scaled (pixel) coordinate of your given y value. If no scale is currently computed (for instance {@link SparkAdapter} has not been set or has less than 2 points of data). This method will return the unscaled value. y: the value to scale (should be the same units as your graph's data points) Return type: @return:the pixel coordinates of where this point is located in SparkView's bounds Initialize (EventName As String) Invalidate Invalidate2 (arg0 As android.graphics.Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) IsInitialized As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As android.graphics.Bitmap) As BitmapDrawable SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) Properties: Adapter As com.robinhood.spark.SparkAdapter Get the backing {@link SparkAdapter} AnimateChanges As Boolean Whether or not this view animates changes to its data. Background As android.graphics.drawable.Drawable BaseLineColor As Int Get the color of the base line BaseLinePaint As android.graphics.Paint Get the {@link Paint} used to draw the base line. Any modifications to this {@link Paint} will not reflect until the next call to {@link #invalidate()} BaseLineWidth As Float Get the width in pixels of the base line's stroke Color As Int [write only] CornerRadius As Float Get the corner radius in pixels used when rounding the sparkline's segments. Data As Float() [write only] Enabled As Boolean FillType As Int FT_DOWN As Int [read only] FT_NONE As Int [read only] FT_TOWARD_ZERO As Int [read only] FT_UP As Int [read only] Height As Int Left As Int LineColor As Int Get the color of the sparkline LineWidth As Float Get the width in pixels of the sparkline's stroke Padding As Int() Parent As Object [read only] ScrubEnabled As Boolean Return true if scrubbing is enabled on this view ScrubLineColor As Int Get the color of the scrub line ScrubLinePaint As android.graphics.Paint Get the {@link Paint} used to draw the scrub line. Any custom modifications to this {@link Paint} will not reflect until the next call to {@link #invalidate()} ScrubLineWidth As Float Get the width in pixels of the scrub line's stroke SparkLinePaint As android.graphics.Paint Get the {@link Paint} used to draw the sparkline. Any modifications to this {@link Paint} will not reflect until the next call to {@link #invalidate()} SparkLinePath As android.graphics.Path [read only] Gets a copy of the sparkline path Tag As Object Top As Int Visible As Boolean Width As Int Please click here to donate for my work to write the wrapper (You can donate any amount you want ) Attachments SparkEx.zip SparkEx.zip 7.9 KB · Views: 709 SparkV1.0.zip SparkV1.0.zip 22.1 KB · Views: 735 Click to expand...
This is a wrap for this Github project: https://github.com/robinhood/spark Spark Author: Version: 1.0 Functions: getItem (index As Int) As Object getX (arg0 As Int) As Float getY (index As Int) As Float hasBaseLine As Boolean notifyDataSetChanged notifyDataSetInvalidated randomize registerDataSetObserver (arg0 As android.database.DataSetObserver) unregisterDataSetObserver (arg0 As android.database.DataSetObserver) Properties: BaseLine As Float [read only] Count As Int [read only] Data As Float() [write only] DataBounds As android.graphics.RectF [read only] SparkView Events: onScrubbed (value As Object) Fields: ba As BA Functions: BringToFront DesignerCreateView (base As Panel, lw As Label, props As Map) getScaledX (x As Float) As Float Get the scaled (pixel) coordinate of your given x value. If no scale is currently computed (for instance {@link SparkAdapter} has not been set or has less than 2 points of data). This method will return the unscaled value. x: the value to scale (should be the same units as your graph's data points) Return type: @return:the pixel coordinates of where this point is located in SparkView's bounds getScaledY (y As Float) As Float Get the scaled (pixel) coordinate of your given y value. If no scale is currently computed (for instance {@link SparkAdapter} has not been set or has less than 2 points of data). This method will return the unscaled value. y: the value to scale (should be the same units as your graph's data points) Return type: @return:the pixel coordinates of where this point is located in SparkView's bounds Initialize (EventName As String) Invalidate Invalidate2 (arg0 As android.graphics.Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) IsInitialized As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As android.graphics.Bitmap) As BitmapDrawable SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) Properties: Adapter As com.robinhood.spark.SparkAdapter Get the backing {@link SparkAdapter} AnimateChanges As Boolean Whether or not this view animates changes to its data. Background As android.graphics.drawable.Drawable BaseLineColor As Int Get the color of the base line BaseLinePaint As android.graphics.Paint Get the {@link Paint} used to draw the base line. Any modifications to this {@link Paint} will not reflect until the next call to {@link #invalidate()} BaseLineWidth As Float Get the width in pixels of the base line's stroke Color As Int [write only] CornerRadius As Float Get the corner radius in pixels used when rounding the sparkline's segments. Data As Float() [write only] Enabled As Boolean FillType As Int FT_DOWN As Int [read only] FT_NONE As Int [read only] FT_TOWARD_ZERO As Int [read only] FT_UP As Int [read only] Height As Int Left As Int LineColor As Int Get the color of the sparkline LineWidth As Float Get the width in pixels of the sparkline's stroke Padding As Int() Parent As Object [read only] ScrubEnabled As Boolean Return true if scrubbing is enabled on this view ScrubLineColor As Int Get the color of the scrub line ScrubLinePaint As android.graphics.Paint Get the {@link Paint} used to draw the scrub line. Any custom modifications to this {@link Paint} will not reflect until the next call to {@link #invalidate()} ScrubLineWidth As Float Get the width in pixels of the scrub line's stroke SparkLinePaint As android.graphics.Paint Get the {@link Paint} used to draw the sparkline. Any modifications to this {@link Paint} will not reflect until the next call to {@link #invalidate()} SparkLinePath As android.graphics.Path [read only] Gets a copy of the sparkline path Tag As Object Top As Int Visible As Boolean Width As Int Please click here to donate for my work to write the wrapper (You can donate any amount you want )
peacemaker Expert Licensed User Longtime User Nov 13, 2017 #2 Interesting... thanks. Multilines possible ? Or transparent background to combine several lines ?
johndb Active Member Licensed User Longtime User Nov 15, 2017 #3 peacemaker said: Interesting... thanks. Multilines possible ? Or transparent background to combine several lines ? Click to expand... Multilines are possible by overlaying many spark controls (one spark for each line) and setting the background color as transparent for each spark.
peacemaker said: Interesting... thanks. Multilines possible ? Or transparent background to combine several lines ? Click to expand... Multilines are possible by overlaying many spark controls (one spark for each line) and setting the background color as transparent for each spark.
Rantor777 Member Licensed User Nov 15, 2017 #4 This lib have so many possibilities in a wide range of apps.. +10
DonManfred Expert Licensed User Longtime User Nov 15, 2017 #5 You can donate $10, you also can donate much more if you want
DonManfred Expert Licensed User Longtime User Apr 29, 2020 #7 icakinser said: Is there a way this could run in b4j? Click to expand... You can try it. If it crash then it does not work.
icakinser said: Is there a way this could run in b4j? Click to expand... You can try it. If it crash then it does not work.
I icakinser Member Licensed User Longtime User Apr 29, 2020 #8 DonManfred said: You can try it. If it crash then it does not work. Click to expand... It crashed. Will have to work on doing my own wrapping.
DonManfred said: You can try it. If it crash then it does not work. Click to expand... It crashed. Will have to work on doing my own wrapping.