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

adriano.freitas

Active Member
Sorry, but I am completely confused, I really do not understand the explanations of your problem.
Can't you post a small project showing your problem.

I apologize for the confusion, my native language is not English and I certainly don't know how to explain it well.

The project is big, but I'll try to show you what I'm doing:

1) See Fig 1. I use:

B4X:
    GraficoBarras.ChartBackgroundColor  = xui.Color_Black
    GraficoBarras.LegendBackgroundColor = xui.Color_Black
    GraficoBarras.LegendTextColor       = xui.Color_White ' ---> No change on legend color

And as you can see in the image, the caption text remains black, even though I defined the color white in the code.


2) See Fig 2:
Due to the colors chosen for the application, the frame that appears when we click on the chart shows some data that is sometimes confusing. It would be great if we could change the background color of this little panel.
 

Attachments

  • Fig 1.jpg
    73.3 KB · Views: 161
  • Fig 2.jpg
    181 KB · Views: 174

adriano.freitas

Active Member
Wonder! I am so grateful for the attention!
I will retest version 7.5 today!
Once again my congratulations and thanks for the brilliant work!
 

angel_

Well-Known Member
Licensed User
Longtime User
I think the X and Y values are not displayed correctly when YXChartDisplayValues is true in the YXChart with logarithmic scale
 

madru

Active Member
Licensed User
Longtime User
Hello Klaus,

I have a little problem with bars & scaling (I guess), as you can see the 7th bar is missing his value 5.0.
4.9 and 5.1 are drawn acorrectly with proper scaling. any idea why this is happening ?

B4X:
graph.ScaleValues = "1!1.5!2!2.5!5!7.5!10"


I face
 

yzhy-mail

Member
Can the xchart to be scrollable. like Stock market chart.
When you move fingure ,it can be show chart continuously.
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
in this area chart, the legend is collapsed on a single line, and I can't find the parameter to correct it
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
I can't either without seeing what you have done and how.
Can you post a small project showing the problem.
here it is: look at the B4J project
thank you
 

Attachments

  • testareachart.zip
    16.6 KB · Views: 129

klaus

Expert
Licensed User
Longtime User
You have set TextSizes = 0 in the code and in the Designer, that is the problem.
What exactly did you expect setting text sizes equal to 0 ?
You can hide different displays setting the appropriate property like DrawScaleX, DrawScaleY.
For others simply set the Text to "", an empty string.
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
Looks like the AxisTextSize is also used for the legend
As soon as I set it to 10, the legend was ok
Thank you
 

klaus

Expert
Licensed User
Longtime User
Looks like the AxisTextSize is also used for the legend
Yes.
In my opinion it is not a good practice to set a TextSize = 0.
If somebody does not want to display a text, this one should be set to "", empty text.
That is how xChart works.
 
Last edited:

Alessandro71

Well-Known Member
Licensed User
Longtime User
Yes.
In my opinion it not a good practice to set a TextSize = 0.
If somebody does not want to display a text, this one should be set to "", empty text.
That is how xChart works.
I noticed that setting the axis text to “” still produces a little offset to the chart border, while setting text size to 0 does not.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…