Comments (12)
@fightaadeshfight
Can you elaborate, please, how do you want to apply colors and font? According which value/condition? Many options available here.
from anychart-android.
Like right now the text is picking random colors. I wanted to create my own set of colors which will be picked at random(there is no condition for it). I just want different shades.
For font i just want a different font for the complete chart.(Again, no conditions applied.)
from anychart-android.
@fightaadeshfight
You can define your own custom palette and the tag cloud will take colours from that palette.
You can implement it like this:
OrdinalColor ordinalColor = new OrdinalColor();
ordinalColor.setColors(new String[] { "#000000", "#f18126", "#3b8ad8", "#00ff00", "#ff0000" });
tagCloud.setColorScale(ordinalColor);
Font you can apply like this:
TagCloud.getNormal().setFontFamily("Helvetica");
tagCloud.getNormal().setFontSize(8);
tagCloud.getSelected().setFontStyle(TextFontStyle.ITALIC);
from anychart-android.
Can i add my custom font family(like in the form of ttf or otf file in android) or i can only choose from the ones already defined?
from anychart-android.
@fightaadeshfight
Yes! Now it's possible.
You can do it like this:
anyChartView.addFont("Pacifico", "file:///android_asset/Pacifico.ttf");
tagCloud.getNormal().setFontFamily("Pacifico");
And the Pacifico.ttf file should be located in assets
.
We have just updated the library to implement this feature. Please, download the latest version to enable this feature.
from anychart-android.
Do i need to download the jar file? The new dependency does not seem to work
from anychart-android.
@fightaadeshfight
Can you specify how you include dependencies? With Gradle or any other tool?
from anychart-android.
with gradle. The old dependency
compile 'com.github.AnyChart:AnyChart-Android:0.1.9'
is working fine.
But when i change it to new version it stops working.
from anychart-android.
@fightaadeshfight
ok, I see. Can you share with us the error log by Gradle?
from anychart-android.
its working now. it wasn't a few hours earlier. maybe the mirrors were not updated or something. Thanks anyways.
from anychart-android.
I gave the ordinal colors as you said
OrdinalColor ordinalColor = new OrdinalColor();
ordinalColor.setColors(new String[] { "#3A3042", "#DB9D47", "#FF784F", "#5BC0EB", "#3C91E6", "#325060", "#6E8898", "#9FB1BC", "#E6EDE9", "#E2C044"});
cloud.setColorScale(ordinalColor);
But it picks a 4 colors for the big words. rest are same. Is there a limit to colors that i can give? And if the items in the list is around 10 only one color is shown.
from anychart-android.
I figure it out. The colors were distributed according to category. So if i do not define any category the colors get distributed via range. So, i defined an array of categories and added them at random and hence the colors were chosen at random.
from anychart-android.
Related Issues (20)
- the problem in treemap HOT 4
- Heatmap Chart not working HOT 1
- Documentation website is down HOT 1
- Feature request Dark Mode HOT 1
- Charts are not displaying HOT 8
- Android: Change background color of a chart HOT 2
- Build issue: Manifest merger failed with multiple errors
- Updating datasets for multiple charts in single view HOT 1
- Download it and run it, click on the page and nothing is displayed HOT 7
- Getting blank page when try to open any graph HOT 2
- Loading MutableLiveData
- tree chart is showing on activity but not showing in fragment HOT 1
- Cannot resolve symbol 'AnyChartView' in Android Studio version Arctic Fox |2020.3.1 Patch 3 HOT 1
- Pie chart is flickering whenever new data is inserted HOT 1
- When I add chart, cant see anything in designer HOT 3
- Changing label color depending on data value
- Bar chart not showing when use more then one view.... HOT 2
- i have problem chart not displaying HOT 3
- Sponsored issue: Java to Kotlin HOT 1
- Vertical Bar data does not refresh when tried to update with new data set. HOT 2
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 anychart-android.