Git Product home page Git Product logo

Comments (17)

diogobernardino avatar diogobernardino commented on August 15, 2024

You can use the method setBorderSpacing(dimen) to move bars to the right, away from labels.

from williamchart.

kruil avatar kruil commented on August 15, 2024

Thank you for the fast answer. Unforunately I don't know how many letters is my labels, because its a money amount, so it different country to country. It can be just two, if I use euro, or ten, if I use Belarussian currency. So it will cost a pretty much space at right if I move it by border spacing. It should be pretty easy if bars will be allowed to get a transparency colors. Thank you for the great library.

from williamchart.

diogobernardino avatar diogobernardino commented on August 15, 2024

I see. Indeed the opacity would solve it, and in fact I would expect them to accept a hexadecimal with opacity. I will keep the issue opened and review that once I get the time.
Still going back to your problem, and looking at your (tiny) image, it seems to me that you're are setting Labels inside the chart, and that's why they get overlap with bars. Am I right?

from williamchart.

kruil avatar kruil commented on August 15, 2024

Yes, label position is inside now. That because different currency wants different spaces, as I wrote before. If I change it to outside, if there are Belarussian rubles, then labels will get about a half of screen width. Thank you.

from williamchart.

diogobernardino avatar diogobernardino commented on August 15, 2024

Right right. Then you really need bar with opacity. If not implemented, it should be something easy to have. I can let you know once I get a bit of time to recall the code.

from williamchart.

diogobernardino avatar diogobernardino commented on August 15, 2024

Got a chance to test it. In fact the alpha value (the opacity) works, the problem is, and that's something I should fix, when you use alpha in the animation as well, which I assume is your case. Right? If you don't define any alpha for the animation then you will get your bar with opacity.

from williamchart.

skr-sharma avatar skr-sharma commented on August 15, 2024

hi developer,

can you please elaborate how to set space in bottom(X-axis) linelabels from line. i tried setTopSpace() method of Chart class but it only set space of first x-axis line from the next above one not the lineLabels String Array.
in my case i have linelabels Array like,
String LineLabels[]={ "<20","20-25","25-30","30-40","40-50","50-60","60+" };
i explore the library but unable to set space in lineLabels Array values from top..

from williamchart.

diogobernardino avatar diogobernardino commented on August 15, 2024

The only necessary customization can be done either using setTopSpacing(dimen), to set the outside border spacing of an axis, or using setBorderSpacing(dimen) to set both, outside and inside border of the axis. The spacing in between labels is then calculated automatically.

from williamchart.

skr-sharma avatar skr-sharma commented on August 15, 2024

hi developer,
thanks for reply...i appreciate your thought here i have attached the two screenshots one is taken from iPhone (First image) and another is from android (Second image) in which i have used your graph library(WilliamChart
)
i want to configure only two more things in image second:
1- space from bottom(betweeen first drawing line and labelsString ) like ios screenshot
2- fill color to all the drawing point. if possible through your library please let me know i am stuck on this task last week.
i am looking forward to response. thanks in advance.

iphone_graph
iPhone screenShot

android_graph

Android Screenshot

from williamchart.

diogobernardino avatar diogobernardino commented on August 15, 2024

There are no screenshots.

from williamchart.

skr-sharma avatar skr-sharma commented on August 15, 2024

hello developer..
thanks for reply, please check the above comment there i updated the Screenshot as well, i want to make LineChart same as ios Screenshots, please have a look upon that.
any help will be appreciated...waiting for your response.

from williamchart.

diogobernardino avatar diogobernardino commented on August 15, 2024

1 - Use the normal android:paddingBottom in the xml.
2 - As stated in the wiki, you have the method: setFill(color).

Nice chart.

from williamchart.

skr-sharma avatar skr-sharma commented on August 15, 2024

Hello Diogober bardino,,

tone of thanks for your reply.....really i appreciate your work 👍 , as you guided in above comment the point two method setFill(color) is working good.
still i have problem with setting space...i used android:paddingBottom but it took space from bottom but i want to set space between first y-axis line zero k (i.e 0k) and bottom Labels String values(same as ios screen) please have look of below screenshot there i indicate space which i need to set in my app even i tried setTopSpacing(dimen) and .setBorderSpacing(dimen) but unable to achieve.
looking forward and thanks in advance.

image

from williamchart.

diogobernardino avatar diogobernardino commented on August 15, 2024

I still have no method to set that, but though I have it abstract in a way that you can easily change that if you want. Look at the AxisController class, line 121:
distLabelToAxis= (int) chartView.getResources().getDimension(R.dimen.axis_dist_from_label);

So distLabelToAxis is the variable you would like to increase the value.

from williamchart.

skr-sharma avatar skr-sharma commented on August 15, 2024

finally it works welI , i ought you my best thanks to you, For being supportive and understanding, gr8 work by Diogober Nardino keep it up 👍 👍 👍 .
Please, accept my heartfelt Thank u...!

from williamchart.

ZakHussain-dev avatar ZakHussain-dev commented on August 15, 2024

hi developer,
can you please elaborate how to set space between labels. I tried
mChart.setAxisLabelsSpacing(20f);
this increase the space between the line(X-axis) and labels, But how can i customize the label space.
Thanks.

from williamchart.

diogobernardino avatar diogobernardino commented on August 15, 2024

Unless you're missing a detail, what you're asking doesn't seem to make sense. Chart's width is always limited to the one you define in the layout and, the spacing between labels will always depend on that width against the number of labels you have defined in your chart.

from williamchart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.