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

Johan Schoeman

Expert
Licensed User
Longtime User
What about the /Object/res/layout folder? Do you have the 4 XML files in it?
 

Johan Schoeman

Expert
Licensed User
Longtime User
....also, have you added a customview to your project with the correct type and named it mlc1?
 

dusanpon

New Member
Licensed User
Longtime User
....also, have you added a customview to your project with the correct type and named it mlc1?

The 4 xml files were not there, but are there now; I copied those from your demo. It works now!
So it looks I have to copy the content of \drawable and \layout dirs to make it run. Thanks! Please have a beer on my account.
Regards

Dušan
 

Johan Schoeman

Expert
Licensed User
Longtime User
The 4 xml files were not there, but are there now; I copied those from your demo. It works now!
So it looks I have to copy the content of \drawable and \layout dirs to make it run. Thanks! Please have a beer on my account.
Regards

Dušan
Yes, the 4 files in the /drawable folder and the 4 in the /layout folder work together. And thanks - much appreciated. Will have a beer or two!
 

Mikonios

Active Member
Licensed User
Longtime User
I need help ...
In the example attached should show 5 lines adjusted to the left to see perfectly. And a line should be adjusted to the right that I am unable to display it.
Anyone can help me and tell me where I'm wrong ????
Thank you very much !!!!

 

Attachments

  • MPMikonios.zip
    348.9 KB · Views: 244

Mahares

Expert
Licensed User
Longtime User
If you comment these 2 lines, your 6th graph will show up on the right axis. I am not sure why, as I have not worked with this library for a few months.
mlc1.YaxisRightMaxVal = 75
mlc1.YaxisRightMinVal = 25
 

phukol

Active Member
Licensed User
Longtime User
Hi guys. Just want to ask how can i disable the rotation of radarchart? i place my charts in a pager so users can swipe available charts left or right however, when i use a radarchart, i have to find a spcific area where the swipe for the pager will work. i just plan to disable the rotation for radarchart so i can have a greater area for swiping the pager.
 

Johan Schoeman

Expert
Licensed User
Longtime User
The method is already in the library. Use it for eg like this i.e after the data has been set:

B4X:
mrc1.setRadarData(1,10)
mrc1.RotationEnabled = False
 

Mikonios

Active Member
Licensed User
Longtime User
I comment both lines, but I do not get to see the sixth blue line on the graph.

Here is the problema ::

mlc1.YaxisLeftMaxVal = 1.190
mlc1.YaxisLeftMinVal = 1.110
' mlc1.YaxisRightMaxVal = 50
' mlc1.YaxisRightMinVal = 30

Any other ideas ??
 
Last edited:

Mikonios

Active Member
Licensed User
Longtime User
It is true and you're right.
When I run mode 'Release' it works well.
The problem was in 'Debug' mode with a line in pause before the end of the graph.
Thank you very much Mahares.
 

M.LAZ

Active Member
Licensed User
Longtime User
Hi Johan,,,
Thank u so much for this wrapper,,,
every thing is ok but i 've a comments about :
1- How Could i display all (mlc1.XaxisLables) in X Axis? without hide values of some ( XaxisLables ).

2- is there any availability to draw graphs without changing the Orientation(height > width) ,, cos i try to use wrapper in other Activity not Main ,, every time i load the activity (graph_activity) then i change the orientation to landscape
B4X:
p.SetScreenOrientation(0)  ' 0 for landscape

and as we know the activity will recreate itself again and i lost all my process global variables which i sent them from another activity. any help please..

i am so happy with this Fantastic Wrapper.
 
Last edited:

Johan Schoeman

Expert
Licensed User
Longtime User
See this thread for one activity in landscape and another activity in portrait

https://www.b4x.com/android/forum/threads/landscape-or-portrait.56117/
 

Descartex

Well-Known Member
Licensed User
Longtime User
This is a amazing library!!!
Thumbs up for Johan!!!
Only a question:
Can it work on B4i?
I have to implement the B4i version for the app i'm using it and it would be perfect if i can use it also there.
Regards!!
 

Johan Schoeman

Expert
Licensed User
Longtime User
This is a amazing library!!!
Thumbs up for Johan!!!
Only a question:
Can it work on B4i?
I have to implement the B4i version for the app i'm using it and it would be perfect if i can use it also there.
Regards!!
Unfortunately not B4I compatible....
 

Mikonios

Active Member
Licensed User
Longtime User
Hello again Johan
I'm trying to show the graphic with displacements TopBottom & RightLeft and am not able to generate with the following code.
It is possible to make?

B4X:
    Dim r As Int = 2
    Select r
        Case 0: mlc1.XYAnimate=False: mlc1.YAnimate=False : mlc1.XAnimate=False   ' NoAnimate
        Case 1: mlc1.XYAnimate=False: mlc1.YAnimate= False : mlc1.XAnimate= True    ' LeftToRight
        Case 2: mlc1.XYAnimate=False: mlc1.YAnimate=True  : mlc1.XAnimate=False   ' BottomToTop
        Case 3: mlc1.XYAnimate= False: mlc1.YAnimate=True  : mlc1.XAnimate=True    ' BottomToTop
        Case 4: mlc1.XYAnimate=True: mlc1.YAnimate=False : mlc1.XAnimate=False   ' BottomToTop
        Case 5: mlc1.XYAnimate=True: mlc1.YAnimate=False : mlc1.XAnimate=True    ' BottomToTop
        Case 6: mlc1.XYAnimate=True: mlc1.YAnimate=True  : mlc1.XAnimate=False   ' BottomToTop
        Case 7: mlc1.XYAnimate=True: mlc1.YAnimate=True  : mlc1.XAnimate=True    ' BottomToTop
    End Select
 
    mlc1.ChartAnimationTime     = 2000                     'milliseconds
 
Last edited:

Johan Schoeman

Expert
Licensed User
Longtime User
Don't know- what does it do/not do when you run the above code?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…