B4A Library MPAndroidCharts - Various type of graphs / charts (most recent library files in post #362)

Discussion in 'Additional libraries, classes and official updates' started by Johan Schoeman, Sep 5, 2015.

  1. Johan Schoeman

    Johan Schoeman Expert Licensed User

    It is drawing grid lines for both the left and right y-axis. You are forcing the right y-axis to start at zero but not the left. Set them the same.
     
  2. rbghongade

    rbghongade Active Member Licensed User

    Got it, so stupid of me! Thanks.
     
  3. Peter Simpson

    Peter Simpson Expert Licensed User

    Go on, buy @Johan Schoeman a four pack, or at least a McDonalds lol...
     
  4. davidvidasoft

    davidvidasoft Member Licensed User

    HI Johan. I am having some problems implementing the library (v1.12). I have replicated the code of your example but when I run the app I get this

    [​IMG]

    In that line of code is located this:
    Code:
    mlcCurrent.LineData = 12   'this number must be the same as the number of elements in the above arrays
    Can I have some help here? I've attached my source code
     

    Attached Files:

  5. Johan Schoeman

    Johan Schoeman Expert Licensed User

  6. davidvidasoft

    davidvidasoft Member Licensed User

    Johan Schoeman likes this.
  7. davidvidasoft

    davidvidasoft Member Licensed User

    Hi again @Johan Schoeman, I was wondering if it's possible to add new data to the charts. I successfully updated the data in my line chart through a button but can't add new values. How should I do it? I'm asking this because my line chart will work with a combobox as date filter and not all the datasets will have the same length.

    EDIT: Ok, it's working as intended. I just needed to also update the legendText to fit the new range of my data.
     
    Last edited: Jan 19, 2018
    Johan Schoeman likes this.
  8. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    Is there a way to pass that library to B4J?
    Thank you.
    Johan.
     
  9. Johan Schoeman

    Johan Schoeman Expert Licensed User

    Unfortunately not Johan. It uses Android Libraries
     
  10. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    Ok Thank. Johan you're the best
     
  11. Joe73

    Joe73 Active Member Licensed User

    Hello,
    the following is possible:?
    I want the initial value for a zoom of the X-axis to be
    and end value of the current display.
    With these values I want to change the labels.
    For example, display the date of individual days without zoom and display the date with zoom at the beginning and end and the hours or minutes in between.
    Is that possible?
    Possibly also 2 lines of labels...?

    Many greetings from Jürgen

    Translated with www.DeepL.com/Translator
     
  12. Johan Schoeman

    Johan Schoeman Expert Licensed User

    Unfortunately not Jurgen. Not unless I go and spend a whole lot of time on the original project that I have wrapped and try to add some additional code to it. Not something that I have on my agenda in the near future.

    Rgds

    Johan
     
  13. Joe73

    Joe73 Active Member Licensed User

    Hello,

    too bad, but I know it takes a lot of time...

    regards
     
  14. rtek1000

    rtek1000 Active Member Licensed User

    Hello guys

    How can I add more buttons?
    I duplicate the code's instructions and via Designer, but when the graphic is loaded, the additional buttons are hidden.

     
  15. rtek1000

    rtek1000 Active Member Licensed User

    Hello,

    How to limit the amount of decimal digits in the Y axis?

    I was able to leave the graph with the fixed scale (YaxisRightMaxVal = YaxisLeftMaxVal and YaxisRightMinVal = YaxisLeftMinVal),
    but when the data is very close to the beginning of the scale, the Y axis displays more decimal digits.

    For example, with data near the end of the scale, the Y axis displays the value "5.0" but when the data is close to the beginning of the scale, the Y axis displays the value "5.0000". When this occurs, the graph automatically adjusts its aspect ratio, making it look like a display defect when it ranges from "5.0" to "5.0000".

    (P.S.: Using lib v5)
     
  16. Johan Schoeman

    Johan Schoeman Expert Licensed User

    Code:
    mlc1.YaxisLeftNumberOfDigits = 2
    mlc1.YaxisRightNumberOfDigits = 
    1
     
  17. kuosda

    kuosda Active Member Licensed User

    HI Johan
    You are really powerful
    But can I draw multiline of different arrays?
    as the picture shows
     

    Attached Files:

  18. Alisson

    Alisson Active Member Licensed User

    Johan Schoeman,

    I used a module to run your code. This is graph:

    upload_2018-6-16_22-27-50.png

    The code worked perfectly, but the graph does not stay in landscape.
    How can I add the landscape mode in the module?

    I've attached an image with the code.


    upload_2018-6-16_22-28-22.png

    Thank you very much.
     
  19. Johan Schoeman

    Johan Schoeman Expert Licensed User

    DonManfred and Johan Hormaza like this.
  20. kevinl

    kevinl New Member Licensed User

    Dear Johan,

    How can I completely disable/hide the marker view when using the multiLineChart?

    Thanks and best regards,
    Kevin
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice