Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么修改Y轴数据 #15

Closed
FanYuanBo888 opened this issue May 16, 2017 · 5 comments
Closed

怎么修改Y轴数据 #15

FanYuanBo888 opened this issue May 16, 2017 · 5 comments

Comments

@FanYuanBo888
Copy link

我需要更改Y轴上的数据,我该怎么修改

@AAChartModel
Copy link
Owner

AAChartModel commented May 16, 2017

默认是根据你传入的 series 数据,自动绘制 y 轴的数据内容的,至于你想要修改 y 轴数据,暂时并未提供对应的AAChartModel 属性接口,可考虑后续添加.

@xiongoahc
Copy link
Contributor

Y轴数字可否只显示整数,人数不能有小数,望后续能添加,谢谢!ps:这框架好强大,但是js那些文件太大,整个框架占用我5M多!

@FanYuanBo888
Copy link
Author

好的 ,谢谢啦!

@xiongoahc
Copy link
Contributor

xiongoahc commented May 17, 2017

yAxis:{
allowDecimals:false //是否允许刻度有小数
}

看了楼主的代码,自己改写了下源码搞定了

@AAChartModel
Copy link
Owner

AAChartModel commented May 17, 2017

@xiongoahc 感谢修改并提交代码,现已合并您所提交的内容.
关于AAChartKit 中的.js 文件体积占用过大的问题,现已在中文说明书的附言中提出了折中的解决办法.
现引用附言内容如下


附言

AAChartKit 封装库的初始设计中,为提升.js文件的加载速度,故将所依赖的.js文件放置在本地.然而由于本项目功能较多,故放置于本地的附加JavaScript文件库体积较大,整个AAJSFiles文件夹下所有的.js文件体积合计共有5.3M左右,若对工程文件体积大小较为敏感的使用者,可使用以下建议的替代方案

  1. 删除在本AAChartKit项目文件中,AAJSFiles文件夹下的5.js文件,文件名称如下
  • AAJQueryLibrary.js
  • AAHighChartsLibrary.js
  • AAHighchartsMore.js
  • AAHighCharts-3d.js
  • AAFunnel.js
  1. AAChartView.html文件中的以下内容
<script src="AAJQueryLibrary.js">
</script>
<script src="AAHighchartsLibrary.js">
</script>
<script src="AAHighchartsMore.js">
</script>
<script src="AAHighcharts-3d.js">
</script>
<script src="AAFunnel.js">
</script>

替换为

<script src="https://img.hcharts.cn/jquery/jquery-1.8.3.min.js">
</script>
<script src="https://img.hcharts.cn/highcharts/highcharts.js">
</script>
<script src="https://img.hcharts.cn/highcharts/highcharts-more.js">
</script>

即可.


此方案是将原本加载放置在本地的.js依赖文件改为了加载放置在网络上的.js文件,减小了本地文件大小,但有可能会有一定的网络延迟(0.5s以内),所以建议AAChartKit用户可根据自己的实际项目的开发需要,酌情选择最终是否使用本替代方案.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants