Comments (7)
There's a method ColumnChartView.setColumnChartData(ColumnChartData data)
.
In most cases you should use data model specific for given type of chart, for ColumnChartView it's ColumnChartData.
from hellocharts-android.
Thanks i've just seen you're answer. But i was doing it the right way.
Can you help me to set the label with the value on my columns??
from hellocharts-android.
If you mean label above column, use this method column.setHasLabels(true);
from hellocharts-android.
And i've done this
//values of the axeY
List<AxisValue> axisValues = new ArrayList<AxisValue>();
axisValues.add(new AxisValue(1));
axisValues.add(new AxisValue(2));
axisValues.add(new AxisValue(3));
axisValues.add(new AxisValue(4));
axisValues.add(new AxisValue(5));
axisValues.add(new AxisValue(6));
axisValues.add(new AxisValue(7));
//Gestion of the two axes for the graphic
Axis axeX = new Axis(axisValues);
data.setAxisXBottom(axeX);
But i didn't see my seven values in my axeX
from hellocharts-android.
- althougth my axisY is display some of my number but not all. Only 1 to 6 but not 7. How can i make the graph show all of them.
Ps. I think you should write a documentation for you library it could be usefull
from hellocharts-android.
Yea, there should be documentation and I will try to add some but it will take time and right now I need a little break. Most of library functions are covered in samples project, but there will always be some special cases that I'm not aware of until someone open new issue.
Back to problem. Axes values have to be within chart viewport to be visible. By default viewport is calculated based on chart values. So for example if your max value on X axis is 6 no axis values greater than that will be displayed. Other possibility is some rounding error in viewport calculation.
Try to experiment with viewport size, here is simple example how to modify(extend) viewport in both directions by 10%:
Viewport v = new Viewport(chart.getMaximumViewport());
float dx = 0.1f * v.width();
float dy = 0.1f * v.height();
v.inset(-dx, -dy);
chart.setMaximumViewport(v);
chart.setCurrentViewport(v, false);
from hellocharts-android.
thanks for the help. the viewport thing help me to show more of the graph.
But my 1st problem was that i was not able to see the value of the graph
//values of the axeY
List<AxisValue> axisValuesForY = new ArrayList<AxisValue>();
for (int i = 1; i < 100; i +=10){
axisValuesForX.add(new AxisValue(i));
}
Axis axeX = new Axis(axisValuesForX);
Axis axeY = new Axis(axisValuesForY);
data.setAxisXBottom(axeX);
data.setAxisYLeft(axeY);
i've done this and nothing show's up on the axeY neither for X.
Plus i've put this.
axeX.setName("Days");
axeY.setName("amount");
and only day is displayed
from hellocharts-android.
Related Issues (20)
- y axis value only shows three digits. i.e, 0,300,600,900,200,500,800,100 etc. I need to show it as 0,300,600,900,1200,1500,1800,2100 HOT 1
- groovy.lang.MissingPropertyException: Could not set unknown property 'name' for object of type org.gradle.api.publish.maven.internal.publication.DefaultMavenPom.
- How to change Background Color Label?
- setCurrentViewport different result on Run and ApplyChanges
- Hellocharts android library not rendering chart when there is a single value or when y axis values are same HOT 2
- "setHasGradientToTransparent" Are Missing on LineChart with Kotlin HOT 3
- How to set axis number to Text in column chart? HOT 1
- Cannot use line.setHasGradientToTransparent() method
- Is it possible to obtain values from the generated graph?
- Importing it as Module
- linechart with multicolor data line
- Compatibility with AndroidX HOT 1
- Horizontal spacing between points
- 关于一个点问题(已解决)
- About the problem that the y-axis is not displayed.
- Unsupported Modules Detected
- HelloCharts
- library configuration
- LineChartView can not make steps of 0.5f
- 垂直折线图
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 hellocharts-android.