All Projects → ZhipingYang → Xychart

ZhipingYang / Xychart

Licence: apache-2.0
XYChart is designed for line & bar of charts which can compare mutiple datas in form styles, and limited the range of values to show, and so on.

Labels

Projects that are alternatives of or similar to Xychart

Esp Dash
A blazing fast library to create a functional dashboard for ESP8266 and ESP32
Stars: ✭ 548 (-22.49%)
Mutual labels:  chart
Jhchart
Stars: ✭ 593 (-16.12%)
Mutual labels:  chart
Chartify
📊 📈 📉 React.js plugin for building charts using CSS
Stars: ✭ 671 (-5.09%)
Mutual labels:  chart
Starcharts
Plot your repository stars over time.
Stars: ✭ 560 (-20.79%)
Mutual labels:  chart
Gojs
JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
Stars: ✭ 5,739 (+711.74%)
Mutual labels:  chart
Klinechart
Android仿火币K线图实现(包含MA,BOLL,MACD,KDJ,RSI,WR指标)
Stars: ✭ 620 (-12.31%)
Mutual labels:  chart
React D3 Tree
🌳 React component to create interactive D3 tree graphs
Stars: ✭ 543 (-23.2%)
Mutual labels:  chart
Ngx Graph
Graph visualization library for angular
Stars: ✭ 704 (-0.42%)
Mutual labels:  chart
Swift Linechart
Line Chart library for iOS written in Swift
Stars: ✭ 589 (-16.69%)
Mutual labels:  chart
Bizcharts
Powerful data visualization library based on G2 and React.
Stars: ✭ 5,771 (+716.27%)
Mutual labels:  chart
Clip
Create charts from the command line
Stars: ✭ 5,111 (+622.91%)
Mutual labels:  chart
Androbd
Android OBD diagnostics with any ELM327 adapter
Stars: ✭ 573 (-18.95%)
Mutual labels:  chart
Financialcustomerview
各种金融类的自定义View,基金走势图、分时图、蜡烛图、各种指标等,一步一步构建庞大的基金自定View...
Stars: ✭ 642 (-9.19%)
Mutual labels:  chart
Echarts For Weixin
Apache ECharts (incubating) 的微信小程序版本
Stars: ✭ 5,479 (+674.96%)
Mutual labels:  chart
React Timeseries Charts
Declarative and modular timeseries charting components for React
Stars: ✭ 690 (-2.4%)
Mutual labels:  chart
Tui.chart
🍞📊 Beautiful chart for data visualization.
Stars: ✭ 5,041 (+613.01%)
Mutual labels:  chart
Hsstockchart
Stock Chart include CandleStickChart,TimeLineChart. 股票走势图,包括 K 线图,分时图,手势缩放,拖动
Stars: ✭ 602 (-14.85%)
Mutual labels:  chart
Ol Ext
Cool extensions for Openlayers (ol) - animated clusters, CSS popup, Font Awesome symbol renderer, charts for statistical map (pie/bar), layer switcher, wikipedia layer, animations, canvas filters.
Stars: ✭ 706 (-0.14%)
Mutual labels:  chart
Chartkick.py
Create beautiful Javascript charts with minimal code
Stars: ✭ 695 (-1.7%)
Mutual labels:  chart
Vis Timeline
📈 Create a fully customizable, interactive timelines and 2d-graphs with items and ranges.
Stars: ✭ 654 (-7.5%)
Mutual labels:  chart


XYChart is designed for line & bar of charts which can compare mutiple datas in form styles, and limited the range of values to show, and so on.

LineChart BarChart
WechatIMG65 WechatIMG66
single datas in linechart single datas in linechart
WechatIMG70 click
LineDotsClicked: show all if the dots closed in multi-datas BarClicked: custom click effects in multi-datas
gif gif
scrolling linechart (did set row width) scrolling barchart (did set row width)

Install

required iOS >= 8.0 with Cocoapods

pod 'XYChart'

Usage

Expand for XYChart details
@interface XYChart : UIView<XYChartReload>

@property (nonatomic, weak, nullable) id<XYChartDataSource> dataSource;
@property (nonatomic, weak, nullable) id<XYChartDelegate> delegate;

@property (nonatomic, readonly) XYChartType chartType;

- (instancetype)initWithFrame:(CGRect)frame type:(XYChartType)type NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithType:(XYChartType)type;

/**
 更新图标数据
 
 @param dataSource 数据
 @param animation 是否执行动画
 */
- (void)setDataSource:(id<XYChartDataSource>)dataSource animation:(BOOL)animation;

/**
 重载数据
 
 @param animation 是否执行动画
 */
- (void)reloadData:(BOOL)animation;

@end

Method 1: details

_chartView = [[XYChart alloc] initWithFrame:CGRectMake(0, 0, 300, 100) chartType:XYChartTypeLine];
_chartView.dataSource = self;
_chartView.delegate = self;
[self.view addSubview:_chartView];

Method 2:

// the obj follow the XYChartDataSource protocol
_datasource = [[XYChartDataSourceItem alloc] init];

_chartView = [[XYChart alloc] initWithType:XYChartTypeLine];
_chartView.dataSource = _datasource;
[self.view addSubview:_chartView];
Expand for XYChartDelegate protocol details
@protocol XYChartDelegate
@optional

/**
 是否展示UIMenuController
 */
- (BOOL)chart:(XYChart *)chart shouldShowMenu:(NSIndexPath *)index;

/**
 点击后的action,重载一般就不show UIMenuController了
 */
- (void)chart:(XYChart *)chart itemDidClick:(id<XYChartItem>)item;

/**
 line用于展示圆圈,bar用于柱形图的动画
 */
- (CAAnimation *)chart:(XYChart *)chart clickAnimationOfIndex:(NSIndexPath *)index;

@end
Expand for XYChartDataSource protocol details
/**
 多套对比数据展示
 */
@protocol XYChartDataSource

/**
 多少条并行对比数据,折线图表现多条线,柱状图表现一列中有几条柱状图
 */
- (NSUInteger)numberOfSectionsInChart:(XYChart *)chart;

/**
 完整的周期内,数据的个数,横向列数
 */
- (NSUInteger)numberOfRowsInChart:(XYChart *)chart;

/**
 x坐标的标题
 */
- (NSAttributedString *)chart:(XYChart *)chart titleOfRowAtIndex:(NSUInteger)index;

/**
 x坐标的标题
 */
- (NSAttributedString *)chart:(XYChart *)chart titleOfSectionAtValue:(CGFloat)sectionValue;

/**
 index下的数据模型
 */
- (id<XYChartItem>)chart:(XYChart *)chart itemOfIndex:(NSIndexPath *)index;

/**
 标记y轴方向高亮区间
 */
- (XYRange)visibleRangeInChart:(XYChart *)chart;

/**
 y轴方向分段,5就分5段
 */
- (NSUInteger)numberOfLevelInChart:(XYChart *)chart;

/**
 横向一栏的宽度
 */
- (CGFloat)rowWidthOfChart:(XYChart *)chart;

/**
 自适应平均分横向栏目的宽度
 */
- (BOOL)autoSizingRowInChart:(XYChart *)chart;

@end

Author

XcodeYang, [email protected]

License

XYChart is available under the MIT license. See the LICENSE file for more info.

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].