HelloChart--PreviewChartView(预览统计图)
来源:互联网 发布:h3c路由器封端口 编辑:程序博客网 时间:2024/05/18 02:47
PreviewColumnChartView、PreviewLineChartView相当于是柱形图、折线图的预览模式,当柱形图与折线图数据过多,就可以通过预览图对其进行展示,用户可通过点击其中一部分进行放大查看。而且PreviewColumnChartView、PreviewLineChartView与ColumnChartView、LineChartView属性类似,只是多了一个预览图效果。
在XML中的定义:
//定义预览柱形图 <lecho.lib.hellocharts.view. PreviewColumnChartView android:id="@+id/previewColumnChartView" android:layout_width="wrap_content" android:layout_height="wrap_content" > </lecho.lib.hellocharts.view. PreviewColumnChartView>//定义预览折线图 <lecho.lib.hellocharts.view. PreviewLineChartView android:id="@+id/previewLineChartView" android:layout_width="wrap_content" android:layout_height="wrap_content" > </lecho.lib.hellocharts.view. PreviewLineChartView>
控件实例化:
//实例化预览柱形图PreviewColumnChartView previewColumnChartView;previewChartView=(PreviewColumnChartView )findViewById(R.id.previewColumnChartView);//实例化预览折线图PreviewLineChartView previewLineChartView;previewChartView=(PreviewLineChartView )findViewById(R.id.previewLineChartView);
chart属性设置:
previewChartView.setZoomEnabled(boolean isZoomEnabled)//设置是否支持缩放previewChartView.setOnValueTouchListener(LineChartOnValueSelectListener touchListener);//为图表设置值得触摸事件previewChartView.setInteractive(boolean isInteractive);//设置图表是否可以与用户互动previewChartView.setValueSelectionEnabled(boolean idValueSelectionEnabled);//设置图表数据是否选中进行显示previewChartView.setPreviewColor(int color);//设置预览图的颜色previewChartView.setLineChartData(LineChartData data);//为图表设置数据,数据类型为LineChartData或者CoulmnChartData
- 预览图基本与折线、柱形图属性一致,仅仅是多了一个设置预览图的颜色属性
设置ChartData属性及为chart设置数据:
//为预览图添加数据 previewColumnChartView.setColumnChartData(LineChartData data); previewLineChartView.setLineChartData(LineChartData data);
PreviewColumnChartView、PreviewLineChartView的数据分别为ColumnChartData、LineChartData,且与ColumnChartView、LineChartView的数据类型一致,可以参考我的关于这两个图表的文章。
折线图相关属性介绍
- 柱形图相关属性介绍
0 0
- HelloChart--PreviewChartView(预览统计图)
- HelloChart--PreviewChartView(预览统计图)
- HelloChart--ComboLineColumnChartView(组合统计图)
- HelloChart--ComboLineColumnChartView(组合统计图)
- HelloChart--ColumnChartView(柱形图)
- HelloChart--PieChartView(饼图)
- HelloChart--ColumnChartView(柱形图)
- HelloChart--PieChartView(饼图)
- 统计图预览页面显示不全
- HelloChart--LineChartView(折线图)
- HelloChart--BubbleChartView(气泡图)
- HelloChart--BubbleChartView(气泡图)
- HelloChart--LineChartView(折线图)
- hellochart详细讲解(一)折线图
- hellochart详细讲解(二)饼状图
- hellochart详细讲解(三)柱状图
- 统计图
- 统计图
- 卷积神经网络-图像卷积的概念
- Python virtualenv安装库报错SSL: CERTIFICATE_VERIFY_FAILED
- POJ2115 C Looooops(拓展欧几里德)
- CI中的路由规则
- 【LeetCode】LeetCode——第4题:Median of Two Sorted Arrays
- HelloChart--PreviewChartView(预览统计图)
- DataPickerView最简单用法。。直接拿过去用就行
- iOS NSString 截取,objectAtIndex,rangeOfString,stringWithContentsOfFile,NSEnumerator
- cocos2dx 安卓makefile Android.mk,动态引用cpp地址
- IOS路线图
- 把makefile 需要编译的源码编译全部删除或者重命名会怎么样?
- Ext中关于Ext.QuickTips.init()的使用
- AVR开发笔记
- 获取LedgerDimention各个维度的组合值