Comments (15)
作者可以给个联系方式吗,有些问题想特别咨询下,我QQ:759439869
from aachartcore.
public AAChartModel xAxisGridLineWidth(Float prop) {
xAxisGridLineWidth = prop;
return this;
}
设置 X轴网格线宽度为0
即可不显示网格线.
但是 AAChartModel 的其中几个默认值如下
xAxisGridLineWidth = 0f;//X轴网格线宽度 默认为为 0f,即隐藏 X轴网格线
yAxisLabelsEnabled = true;
yAxisGridLineWidth = 1f;//Y轴网格线宽度默认为 1f
估计你其实是想隐藏 Y轴的网格线.
from aachartcore.
public AAChartModel yAxisGridLineWidth(Float prop) {
yAxisGridLineWidth = prop;
return this;
}
同理,可通过 AAChartModel 的此函数设置 Y轴的网格线(即水平网格线)宽度为 0,即可隐藏网格线
from aachartcore.
好的,感谢,X轴的最大值可以设置吗
from aachartcore.
.xAxisGridLineWidth(0f) ,这个我刚刚设置了没有作用,网格线还是显示(Android)
from aachartcore.
你应该没看懂我上面的意思,水平的网格线其实是 Y 轴网格线
from aachartcore.
.yAxisGridLineWidth(0f)
即可.
from aachartcore.
.yAxisGridLineWidth(0f) 这个也是设置了的,Y轴的网格线是没有显示了,但是X轴的还是显示(Android)
from aachartcore.
你现在的图形效果是什么样子的?,截图看看
from aachartcore.
from aachartcore.
唉,搞了半天原来你说的是 X 轴的刻度线
AAOptions aaOptions = AAOptionsConstructor.configureChartOptions(aaChartModel);
aaOptions.xAxis.tickWidth = 0f;
即可隐藏 X轴的刻度线
from aachartcore.
aaChartModel = new AAChartModel()
.chartType(AAChartType.Column) //图表类型
.stacking(AAChartStackingType.Normal) //Normal Percent 堆积类型
.title("温度图表2")
.subtitle("温差")
.categories(new String[]{"周一", "周二", "周三", "周四", "周五", "周六","周日"}) //X轴
// .backgroundColor("#4b2b7f")
.dataLabelsEnabled(false)
.borderRadius(0f)
.yAxisTitle("") //纵坐标标题
.yAxisMax(100f)
.yAxisMin(0f)
.yAxisLineWidth(0f)
.yAxisGridLineWidth(0f)
// .xAxisGridLineWidth(0f)//设置X轴网格线不显示
// .xAxisVisible(false) //隐藏X轴
.gradientColorEnable(true) ////是否要为渐变色
.colorsTheme(new Object[]{gradientColorDic1,gradientColorDic2,gradientColorDic3})//设置渐变
.legendEnabled(false) //是否启用图表的图例(图表底部的可点击的小圆点)
.markerRadius(0f)
.markerSymbolStyle(AAChartSymbolStyleType.InnerBlank)
//.colorsTheme(new String[]{"#fe117c","#ffc069","#06caf4","#7dffc0"})//主题颜色数组
.series(new AASeriesElement[]{element3 ,element2, element1});
AAOptions aaOptions = AAOptionsConstructor.configureChartOptions(aaChartModel);
aaOptions.xAxis.tickWidth = 0f;
这样设置之后一样没有作用,X轴的刻度线还是有
from aachartcore.
这样之后,绘图就应该由
//调用 AAChartModel 绘图
aaChartView?.aa_drawChartWithChartModel(aaChartModel)
改变为
//调用 AAChartOptions 绘图
aaChartView.aa_drawChartWithChartOptions(aaOptions);
你是这样做的吗?
from aachartcore.
嗯嗯,感谢,通过这个做法已经解决这个问题
from aachartcore.
public void aa_drawChartWithChartModel(final AAChartModel chartModel) {
AAOptions aaOptions = AAOptionsConstructor.configureChartOptions(chartModel);
this.aa_drawChartWithChartOptions(aaOptions);
}
请看 AAChartView 中的源码,
-
aa_drawChartWithChartModel
本质上其实还是调用的aa_drawChartWithChartOptions
方法. -
所以在绘图时,只要在这两个方法中选择一个就好(不要两个方法都用,造成重复绘制,浪费计算资源).
-
AAOptions 配置起来更灵活.图表属性更丰富齐全,但用起来相对就没有 AAChartModel 用起来简单.
from aachartcore.
Related Issues (20)
- Y轴重定义值问题 HOT 3
- Y轴数据单位刷新后会改变 HOT 2
- 范围视图在数据的min=max时,图表上显示空白,有什么办法显示点东西出来? HOT 3
- android端某些图表点击不能显示浮层AATooltip
- Android版本能不能像轮播图一样滑动,一次滑动一个屏幕的宽度?
- Android版能不能设置X轴间隔的固定宽度?
- 请问Android版如何修改横纵坐标的个数?默认的是12个,并且修改坐标点的字体大小以及点位的数值大小? HOT 5
- Android版柱状图的X轴数据超过1000时绘制不出来 HOT 1
- 请问当Y轴数据均为0时,怎么让Y轴0起点在X轴呢?yAxisMin()没效果 HOT 1
- 如何自定义左右两侧数据 HOT 4
- 放在dataBinding 的布局里,直接找不到路径了,不支持吗 HOT 1
- Android版是否不支持桑基图
- 如何动态滚动刷新呀 HOT 1
- 可以添加空数据时设置view吗 HOT 5
- pie设置 HOT 1
- 折线图X轴首位坐标问题,以及marker光圈问题请教 HOT 4
- Y轴数据显示精度问题 HOT 1
- In your readme file, there is a typo: The package name should be com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView, not com.github.AAChartModel.AAChartCore.AAChartConfiger.AAChartView
- In build.gradle, it should be implementation 'com.github.AAChartModel:AAChartCore:cad1a66ee3', SNAPSHOT does not work. HOT 3
- `setClearBackgroundColor(true)`, 在 `android 4.4.2` 上无效,背景仍是白色的 HOT 9
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 aachartcore.