Comments (17)
You can use the method setBorderSpacing(dimen)
to move bars to the right, away from labels.
from williamchart.
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.
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.
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.
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.
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.
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.
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.
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.
Android Screenshot
from williamchart.
There are no screenshots.
from williamchart.
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.
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.
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.
from williamchart.
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.
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.
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.
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)
- Set chart_smoothLine to true leads chart to draw weird negative hooks
- Set decimals of Y-Axis values HOT 1
- Setting custom point drawable only for specific points HOT 2
- Provide a way to let tooltips draw values HOT 1
- Stack bar charts HOT 1
- It is posible to add a stroke with a specific color on touch/click event? HOT 1
- Animation not working using proGuard HOT 1
- Move repository Jcenter to mavenCentral() HOT 2
- Crashlytics Error: BarChartView.kt line 78 com.db.williamchart.view.BarChartView.drawBars
- How to set up Y axis right? HOT 1
- Grid not fitting the points (squeezed)
- Is it possible to add a small button to show value on line touched?
- crash on tooltip onDataPointTouch HOT 1
- BarChart crashing when changing data on runtime HOT 1
- Function to clear the chart
- No documentation found!!! HOT 2
- Don't have Zoom in feature
- Failed to resolve: williamchart:williamchart:unspecified HOT 3
- Colors provided do not match the number of datapoints HOT 1
- Center Aligned Graph Draw
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from williamchart.