B4A Library MPAndroidCharts - Various type of graphs / charts (Latest library V1.17 in post #1)

Similar threads

B4A Tutorial Android Charts Framework
B4A Library [B4X] [XUI] Pie Chart
Share My Creation Google Charts
B4A Tutorial Add Charts With Google Charts Service
B4A Tutorial [B4X] Smart String Literal

Johan Schoeman

Expert
Licensed User
@Johan Schoeman It seems the value of the data point is ALWAYS shown when you click on a data point. I thought I could disable that behavior by passing FALSE to DrawGraphValues, but that only disables the INITIAL showing of the data value. When you touch a data point on the graph, the value is shown no matter what DrawGraphValues is set to.
Library V1.17 in post #1 of this thread. Use it as follows to display or hide the MarkerView

B4X:
mlc1.DisplayMarker = False    'or mlc1.DisplayMarker = True
Have set the default value in the library to FALSE

Have only added it to single and multi line charts for now.
 

incendio

Well-Known Member
Licensed User
Hi, thanks for this library.

I downloaded these files from post #1
1. mp4ChartLibraryfiles.zip
2. mp4ChartLibv1.17.zip
3. b4aMPChart.zip

There is double file in no 1 & 2, so I choose newer one.
When running example, got this error :
Unknown Member setTheLegendPosition

I was also tried sample from post #6 & #9, Barchart, got error when running:
An error has occured in sub main_activity_create, android.content.res
Resources$NotFoundException:
Resource ID #0x0


Am I missing something?
Note : B4A v9.5
 
Last edited:

Johan Schoeman

Expert
Licensed User
Hi, thanks for this library.

I downloaded these files from post #1
1. mp4ChartLibraryfiles.zip
2. mp4ChartLibv1.17.zip
3. b4aMPChart.zip

There is double file in no 1 & 2, so I choose newer one.
When running example, got this error :
Unknown Member setTheLegendPosition

I was also tried sample from post #6 & #9, Barchart, got error when running:
An error has occured in sub main_activity_create, android.content.res
Resources$NotFoundException:
Resource ID #0x0


Am I missing something?
Note : B4A v9.5
See post #12 for the ResourcesNotFoundException

Note that some methods have changed name over the years - find the correct method(s) in the drop down method list when for ex typing mlc1.
 

incendio

Well-Known Member
Licensed User
See post #12 for the ResourcesNotFoundException

Note that some methods have changed name over the years - find the correct method(s) in the drop down method list when for ex typing mlc1.
Example from post #6 & #9 now run OK, thanks, but example from post #1 still error.

In example post #1 I changed
setTheLegendPosition -> TheLegendPosition = "RIGHT_OF_CHART"

and got error :
ClassNotFoundExection : JHS.MPChart.pieViewWrapper
 
Last edited:

Johan Schoeman

Expert
Licensed User
Example from post #6 & #9 now run OK, thanks, but example from post #1 still error.

In example post #1 I changed
setTheLegendPosition -> TheLegendPosition = "RIGHT_OF_CHART"

and got error :
ClassNotFoundExection : JHS.MPChart.pieViewWrapper
Try with the attached project with library V1.17 that is posted in post #1 of this thread.
Extract ProjectRes.zip and copy the folder and its contents to be on the same folder level of the B4A project's /Object and /Files folder (just making it a bit easier so that the files don't get deleted if their properties are not set to READ ONLY when they are in the /Objects/res/drawable and Objects/res/layout folders and you compile the B4A project).

Long click on the pie chart to get a bitmap that will be displayed in the Imageview on the left. Handle the returned bitmap in your B4A code.


1.png
 

Attachments

incendio

Well-Known Member
Licensed User
Try with the attached project with library V1.17 that is posted in post #1 of this thread.
Extract ProjectRes.zip and copy the folder and its contents to be on the same folder level of the B4A project's /Object and /Files folder (just making it a bit easier so that the files don't get deleted if their properties are not set to READ ONLY when they are in the /Objects/res/drawable and Objects/res/layout folders and you compile the B4A project).

Long click on the pie chart to get a bitmap that will be displayed in the Imageview on the left. Handle the returned bitmap in your B4A code.


View attachment 86143
Thanks, now work as a charm.

Perhaps, the example from post # could be updated with this.
 
Top