B4J Library [B4X] [XUI] xChart Class and b4xlib

Discussion in 'B4J Libraries & Classes' started by klaus, Apr 12, 2018.

  1. Scantech

    Scantech Well-Known Member Licensed User

    Thank you Klaus for your wonderful xChart and also xGauge. I intergrated xChart with xGauge and working good so far.
    I wish you had a donation button.

    1.jpg
     
    Peter Simpson, Johan Hormaza and Erel like this.
  2. klaus

    klaus Expert Licensed User

    Can you please check the attached library?
     

    Attached Files:

  3. Scantech

    Scantech Well-Known Member Licensed User

    1.81899E-12 is not showing anymore. That is fixed :).

    But, Scale(sY).YZeroAxis = True is not fixed. I still see negative Y Text values. See attach. -50 and -100 are shown.
    1.jpg
     
  4. klaus

    klaus Expert Licensed User

    Can you please post your project so I can see what exactly happens.
     
  5. Scantech

    Scantech Well-Known Member Licensed User

    Here you go.
    Try both of them AddLinePointData and AddLineMultiplePoints at Sub DrawDynamicLinePoints
     

    Attached Files:

  6. klaus

    klaus Expert Licensed User

    The xChart class has been updated to version 4.0 in the first post.
    Amended the issues reported above, thank you Scantech.

    There will never be one. I do it because I have pleasure doing it.
     
  7. Scantech

    Scantech Well-Known Member Licensed User

    Thanks Klaus. Impressive and working like a charm.
     
  8. Scantech

    Scantech Well-Known Member Licensed User

    1 final issue. It looks like we did not test the opposite. Plug in Direction = Rnd(-100, -1) in my example. You will see Positive Y text with Scale(sY).YZeroAxis = True
     
  9. klaus

    klaus Expert Licensed User

    You are right.
    Amended in the first post.
     
    Erel, Scantech and Johan Hormaza like this.
  10. klaus

    klaus Expert Licensed User

    The xChart class has been updated to version 4.2 in the first post.
    Amended Draw MinLine with YZeroAxis.
    Added PiePercentageNbFractions property

    EDIT: You need to open and close the Designer to make the new property active.
     
    Last edited: Nov 7, 2019
  11. universengo

    universengo Member

    Hello Klaus! I used your Xchart lib and found the error as
    Code:
    Error occurred on line: 286
    java.lang.NumberFormatException: 
    For input string"null"
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:
    2043)
        at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:
    110)
        at java.lang.Double.parseDouble(Double.java:
    538)
        at anywheresoftware.b4a.debug.RDebugUtils.numberCast(RDebugUtils.java:
    48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:632)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:234)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:167)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    91)
        at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:
    98)
        at anywheresoftware.b4j.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:
    62)
        at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:
    93)
        at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:
    84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:632)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:237)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:167)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    91)
        at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:
    98)
        at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:
    64)
        at b4j.example.thongkeslkt._show(thongkeslkt.java:
    69)
        at b4j.example.main._tkslkt_action(main.java:
    830)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
    62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.shell.Shell.runMethod(
    Shell.java:632)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(
    Shell.java:237)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(
    Shell.java:167)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
    43)
        at java.lang.reflect.Method.invoke(Method.java:
    498)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    91)
        at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:
    98)
        at anywheresoftware.b4a.BA$
    1.run(BA.java:216)
        at com.sun.javafx.application.PlatformImpl.lambda$
    null$172(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$
    173(PlatformImpl.java:294)
        at com.sun.glass.ui.InvokeLaterDispatcher$
    Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$
    null$147(WinApplication.java:177)
        at java.lang.Thread.run(
    Thread.java:748)
    Please help me, plz. Thanks.
     
  12. klaus

    klaus Expert Licensed User

    You need to open the Designer and close it, because I added a new property.
     
  13. universengo

    universengo Member

    The Error was solved!
    But I can't find PiePercentageNbFractions property in Designer.
    How can I setup my data with PiePercentageNbFractions ?
    Help me! Thanks.
     
  14. klaus

    klaus Expert Licensed User

    You can change it here:

    upload_2019-11-7_9-20-5.png

    Or in the code with:

    PieChart1.PiePercentageNbFractions = 1
     
    Peter Simpson and universengo like this.
  15. universengo

    universengo Member

    That's OK. Thank you very much! Klaus!
     
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