xuuhan / Hxcharts
📊 Chart for iOS 仪表盘、柱状图、圆形图、折线图、环形图
Stars: ✭ 301
Programming Languages
ring
36 projects
Projects that are alternatives of or similar to Hxcharts
android-charts
A curated list of Android Chart libraries.
Stars: ✭ 69 (-77.08%)
Mutual labels: chart, charts, line
react-native-tcharts
基于React Native ART的图表组件库
Stars: ✭ 25 (-91.69%)
Mutual labels: charts, line, circle
SwiftCharts
Easy to use and highly customizable charts library for iOS
Stars: ✭ 2,405 (+699%)
Mutual labels: chart, charts
JMeter-Charts
Application used to generate reports by uploading a JTL file to a rest server
Stars: ✭ 19 (-93.69%)
Mutual labels: chart, charts
awesome-tools
Open-source list of awesome data visualization tools (e.g., charting libraries) for software developers 📊📈
Stars: ✭ 47 (-84.39%)
Mutual labels: chart, charts
LMGraphView
LMGraphView is a simple and customizable graph view for iOS.
Stars: ✭ 61 (-79.73%)
Mutual labels: chart, line
better-access-charts
Better charts for Access with chart.js
Stars: ✭ 19 (-93.69%)
Mutual labels: chart, charts
awesome-canvas
Canvas资源库大全中文版。An awesome Canvas packages and resources.
Stars: ✭ 288 (-4.32%)
Mutual labels: chart, charts
LineChartView
An interactive line chart written in SwiftUI with many customizations (colors, line size, dots, haptic feedbacks). Support value and time series.
Stars: ✭ 59 (-80.4%)
Mutual labels: chart, charts
Mermaid
Provides a parser function to generate diagrams and flowcharts with the help of the mermaid script language
Stars: ✭ 27 (-91.03%)
Mutual labels: chart, charts
HCLineChartView
HCLineChartView is a beautiful iOS library for drawing line charts. It is highly customizable and easy to use.
Stars: ✭ 22 (-92.69%)
Mutual labels: chart, charts
UCharts
UCharts allows creating radar charts, pie charts, half pie chart in your Unity3d Games.
Stars: ✭ 33 (-89.04%)
Mutual labels: chart, charts
Fl chart
A powerful Flutter chart library, currently supporting Line Chart, Bar Chart, Pie Chart, Scatter Chart and Radar Chart.
Stars: ✭ 3,882 (+1189.7%)
Mutual labels: chart, charts
react-native-d3multiline-chart
Animated Android and iOS multiline/line/scatterPoint chart based on d3.js 🤘😎🤘
Stars: ✭ 43 (-85.71%)
Mutual labels: charts, line
acceptance-testing
Acceptance test suite for the Helm client
Stars: ✭ 22 (-92.69%)
Mutual labels: chart, charts
HXCharts
HXCharts包括了仪表盘、柱状图、圆形图、折线图、环形图等五种绘图。
仪表盘、柱状图、圆形图支持渐变色或单色,折线图、环形图只支持单色
柱状图支持水平和竖直两种方向并支持滑动
折线图支持负数。
环形图可以选择标注值所相对应与图表的上下左右四个方位。
仪表盘、柱状图、折线图可以自定义标注值的数量。
下面是在项目中使用HXCharts的实际效果:
语言
- Objective-C
安装
- 下载demo,将HXcharts文件夹拖入到自己项目中
版本
- V1.2 : 新增环形图,环形图标注值支持上下左右四个方位布局
历史版本
- V1.1 : 折线图支持负数,当出现负数时,会自动计算Y轴标注值个数,初始化自定义y轴个数参数将失效。
使用
- 导入头文件
#import "HXCharts.h"
仪表盘
- 用初始化方法并传入最大值与实际值
- 传入颜色
- 传入要显示标注值的数量
HXGaugeChart *gauge = [[HXGaugeChart alloc] initWithFrame:CGRectMake(x, y, chartWidth, chartWidth) withMaxValue:300 value:225];
gauge.valueTitle = @"225";
gauge.colorArray = @[[self colorWithHexString:@"#33d24e" alpha:1],
[self colorWithHexString:@"#f8e71c" alpha:1],
[self colorWithHexString:@"#ff9500" alpha:1],
[self colorWithHexString:@"#ff4e65" alpha:1]];
gauge.locations = @[@0.15,@0.4,@0.65,@0.8];
gauge.markLabelCount = 5;
[self.view addSubview:gauge];
圆形图
- 用初始化方法并传入最大值与实际值
- 传入颜色
HXCircleChart *circle = [[HXCircleChart alloc] initWithFrame:CGRectMake(x, y, chartWidth, chartWidth) withMaxValue:100 value:85];
circle.valueTitle = @"85%";
circle.colorArray = @[[self colorWithHexString:@"#00fec7" alpha:1],[self colorWithHexString:@"#00d8fe" alpha:1]];
circle.locations = @[@0.15,@0.85];
[self.view addSubview:circle];
柱状图
- 用初始化方法传入标注值的个数与绘图方向
- 传入文字数组
- 传入对应值数组
- 传入柱子颜色数组与背景线颜色(默认灰色)
- 要修改柱子的宽度需要去.m文件中修改_margin(柱子间间距)的值
HXBarChart *bar = [[HXBarChart alloc] initWithFrame:CGRectMake(barChartX, barChartY, barChartWidth, barChartHeight) withMarkLabelCount:6 withOrientationType:OrientationHorizontal];
bar.titleArray = @[@"一月",@"二月",@"三月",@"四月",@"五月",@"六月"];
bar.valueArray = @[@"34",@"72",@"260",@"44",@"180",@"53"];
bar.colorArray = @[color1,color2,color3,color4,color5,color6];
bar.locations = @[@0.15,@.85];
bar.backgroundLineColor = [self colorWithHexString:@"#4b4e52" alpha:1];
[self.view addSubview:bar];
折线图
- 初始化
- 传入文字数组
- 传入对应值数组
- 传入画线颜色、填充颜色与背景线颜色(默认灰色)
HXLineChart *line = [[HXLineChart alloc] initWithFrame:CGRectMake(lineChartX, lineChartY, lineChartWidth, lineChartHeight)];
[line setTitleArray:@[@"星期一",@"星期二",@"星期三",@"星期四",@"星期五",@"星期六",@"星期日"]];
[line setValue:@[@11,@44,@193,@57,@66,@144,@156] withYLineCount:6];
line.lineColor = [self colorWithHexString:@"#43befa" alpha:1];
line.fillColor = [self colorWithHexString:@"#2e3f53" alpha:0.5];
line.backgroundLineColor = [self colorWithHexString:@"#4b4e52" alpha:1];
[self.view addSubview:line];
环形图
- 初始化传入frame与标注值相对于图标的方位,MarkViewDirectionNone则不显示标注值,图表居中
- 传入frame
- 传入颜色数组
- 传入数值数组
- 传入文字数组
- 调用绘图方法
HXRingChart *ring = [[HXRingChart alloc] initWithFrame:CGRectMake(ringChartX, ringChartY, ringChartWidth, ringChartHeight) markViewDirection:MarkViewDirectionRight];
[self.view addSubview:ring];
ring.colorArray = colorArray;
ring.valueArray = valueArray;
ring.titleArray = titleArray;
ring.ringWidth = 20.0;
ring.title = @"总计";
[ring drawArc];
说明
demo中颜色使用的是渐变色,也可以选择单色,更多属性请去.h文件里看
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].