[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7114":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},7114,"SwiftCharts","ivnsch\u002FSwiftCharts","ivnsch","Easy to use and highly customizable charts library for iOS","",null,"Swift",2574,406,75,52,0,1,59.93,"Apache License 2.0",false,"master",true,[24,25,26,27,28,29,30,31,32],"chart","charts","graph","graphs","ios","plot","plots","swift","swift-3","2026-06-12 04:00:32","⚠️ Not maintained anymore! If you want to become a maintainer, [let me know](ivanhp978@gmail.com).\n\n# SwiftCharts\n\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FSwiftCharts.svg?style=flat)](http:\u002F\u002Fcocoadocs.org\u002Fdocsets\u002FSwiftCharts)\n[![Carthage compatible](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCarthage-compatible-4BC51D.svg?style=flat)](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fl\u002FSwiftCharts.svg?style=flat)](http:\u002F\u002Fcocoadocs.org\u002Fdocsets\u002FSwiftCharts)\n\nEasy to use and highly customizable charts library for iOS\n\n## Features:\n- Bars - plain, stacked, grouped, horizontal, vertical\n- Scatter\n- Lines (straight\u002Fcubic\u002Fcustom path generator)\n- Areas\n- Bubble\n- Multiple axes\n- Candlestick\n- Multiple labels per value (x axis)\n- Everything is customizable - colors, views, units, labels, animations, interactions, axes, etc.\n- Easy creation of arbitrary markers, overlays, info views, etc., using simple UIViews!\n- Modular architecture, which allows to easily create new chart types or add effects to existing types externally (without library changes).\n- Charts can be combined with each other.\n- [Pie chart*](https:\u002F\u002Fgithub.com\u002Fi-schuetz\u002FPieCharts)\n- [Legends*](https:\u002F\u002Fgithub.com\u002Fi-schuetz\u002FChartLegends)\n- Zooming & panning, lockable to x\u002Fy axis, max delta or both. Elastic effect. (unreleased)\n- Extensible axis values and label generators for numbers, dates, etc, with customizable zooming handling (nice numbers, divide in half, etc). (unreleased).\n\n\u003Csub>*These are separate repos for better focus and reusability.\u003C\u002Fsub>\n\niOS 7+\n\n[Video](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=bD6uDF-KckM)\n\n[Documentation](https:\u002F\u002Fgithub.com\u002Fi-schuetz\u002FSwiftCharts\u002Fwiki)\n\n\n![ScreenShot](Screenshots\u002FIMG_0102.jpeg)\n![ScreenShot](Screenshots\u002FIMG_0022.jpeg)\n![ScreenShot](Screenshots\u002FIMG_0023.jpeg)\n![ScreenShot of Multi-chart touch tracking](Screenshots\u002Fmulti-chart-touch.jpg)\n\n![ScreenShot](Screenshots\u002FIMG_1328.PNG)\n\n![ScreenShot](Screenshots\u002FIMG_0026.jpeg)\n![ScreenShot](Screenshots\u002FIMG_0101.jpeg)\n![ScreenShot](Screenshots\u002FIMG_0027.jpeg)\n![ScreenShot](Screenshots\u002FIMG_1330.PNG)\n![ScreenShot](Screenshots\u002FIMG_0029.jpeg)\n![ScreenShot](Screenshots\u002FIMG_1332.PNG)\n![ScreenShot](Screenshots\u002FIMG_0033.jpeg)\n![ScreenShot](Screenshots\u002FIMG_0034.jpeg)\n![ScreenShot](Screenshots\u002FIMG_0037.jpeg)\n![ScreenShot](Screenshots\u002FIMG_1334.PNG)\n![ScreenShot](Screenshots\u002FIMG_0039.jpeg)\n![ScreenShot](Screenshots\u002FIMG_0040.jpeg)\n![ScreenShot](Screenshots\u002FIMG_0041.jpeg)\n\n\n## Installation\n\n### CocoaPods\n\nAdd to your Podfile:\n\n```ruby\nuse_frameworks!\npod 'SwiftCharts', '~> 0.6.5'\n```\n\n\nTo use master directly:\n```ruby\npod 'SwiftCharts', :git => 'https:\u002F\u002Fgithub.com\u002Fi-schuetz\u002FSwiftCharts.git'\n```\n\nAnd then:\n```ruby\npod install\n```\n\nImport the framework in your code:\n```swift\nimport SwiftCharts\n```\n\n### Carthage\n\nAdd to your Cartfile:\n\n```\ngithub \"i-schuetz\u002FSwiftCharts\" ~> 0.6.5\n```\n\n## Contribute\n\nContributions are highly appreciated! To submit one:\n\n1. Fork\n2. Commit changes to a branch in your fork\n3. Push your code and make a pull request\n\n## Quick start \n\nMultiline chart:\n\n```swift\nlet chartConfig = ChartConfigXY(\n    xAxisConfig: ChartAxisConfig(from: 2, to: 14, by: 2),\n    yAxisConfig: ChartAxisConfig(from: 0, to: 14, by: 2)\n)\n\nlet frame = CGRect(x: 0, y: 70, width: 300, height: 500)\n\nlet chart = LineChart(\n    frame: frame,\n    chartConfig: chartConfig,\n    xTitle: \"X axis\",\n    yTitle: \"Y axis\",\n    lines: [\n        (chartPoints: [(2.0, 10.6), (4.2, 5.1), (7.3, 3.0), (8.1, 5.5), (14.0, 8.0)], color: UIColor.red),\n        (chartPoints: [(2.0, 2.6), (4.2, 4.1), (7.3, 1.0), (8.1, 11.5), (14.0, 3.0)], color: UIColor.blue)\n    ]\n)\n\nself.view.addSubview(chart.view)\n```\n\nBars chart:\n\n```swift\nlet chartConfig = BarsChartConfig(\n    valsAxisConfig: ChartAxisConfig(from: 0, to: 8, by: 2)\n)\n\nlet frame = CGRect(x: 0, y: 70, width: 300, height: 500)\n        \nlet chart = BarsChart(\n    frame: frame,\n    chartConfig: chartConfig,\n    xTitle: \"X axis\",\n    yTitle: \"Y axis\",\n    bars: [\n        (\"A\", 2),\n        (\"B\", 4.5),\n        (\"C\", 3),\n        (\"D\", 5.4),\n        (\"E\", 6.8),\n        (\"F\", 0.5)\n    ],\n    color: UIColor.red,\n    barWidth: 20\n)\n\nself.view.addSubview(chart.view)\nself.chart = chart\n```\n\n## Concept:\n\n- Layer architecture, which makes it extremely easy to customize charts, create new types, combine existing ones and add interactive elements.\n\n- Creation of views via a generator function, which makes it easy to use custom views in any layer.\n\n### Main Components:\n\n#### 1. Layers:\n\nA chart is the result of composing layers together. Everything is a layer - axis, guidelines, dividers, line, circles, etc. The idea is to have losely coupled components that can be easily changed and combined. This is for example the structure of a basic chart, which shows a line with circles:\n\n![ScreenShot](Screenshots\u002Flayers.png)\n\n\nFollowing a more low level example, to provide an insight into the layer system. Note that most examples are written like this, in order to provider maximal flexibility.\n\n```swift\nlet chartPoints: [ChartPoint] = [(2, 2), (4, 4), (6, 6), (8, 8), (8, 10), (15, 15)].map{ChartPoint(x: ChartAxisValueInt($0.0), y: ChartAxisValueInt($0.1))}\n\nlet labelSettings = ChartLabelSettings(font: ExamplesDefaults.labelFont)\n\nlet generator = ChartAxisGeneratorMultiplier(2)\nlet labelsGenerator = ChartAxisLabelsGeneratorFunc {scalar in\n    return ChartAxisLabel(text: \"\\(scalar)\", settings: labelSettings)\n}\n\nlet xGenerator = ChartAxisGeneratorMultiplier(2)\n\nlet xModel = ChartAxisModel(firstModelValue: 0, lastModelValue: 16, axisTitleLabels: [ChartAxisLabel(text: \"Axis title\", settings: labelSettings)], axisValuesGenerator: xGenerator, labelsGenerator: labelsGenerator)\n\nlet yModel = ChartAxisModel(firstModelValue: 0, lastModelValue: 16, axisTitleLabels: [ChartAxisLabel(text: \"Axis title\", settings: labelSettings.defaultVertical())], axisValuesGenerator: generator, labelsGenerator: labelsGenerator)\n\nlet chartFrame = ExamplesDefaults.chartFrame(view.bounds)\n\nlet chartSettings = ExamplesDefaults.chartSettingsWithPanZoom\n\n\u002F\u002F generate axes layers and calculate chart inner frame, based on the axis models\nlet coordsSpace = ChartCoordsSpaceLeftBottomSingleAxis(chartSettings: chartSettings, chartFrame: chartFrame, xModel: xModel, yModel: yModel)\nlet (xAxisLayer, yAxisLayer, innerFrame) = (coordsSpace.xAxisLayer, coordsSpace.yAxisLayer, coordsSpace.chartInnerFrame)\n\n\u002F\u002F create layer with guidelines\nlet guidelinesLayerSettings = ChartGuideLinesDottedLayerSettings(linesColor: UIColor.black, linesWidth: ExamplesDefaults.guidelinesWidth)\nlet guidelinesLayer = ChartGuideLinesDottedLayer(xAxisLayer: xAxisLayer, yAxisLayer: yAxisLayer, settings: guidelinesLayerSettings)\n\n\u002F\u002F view generator - this is a function that creates a view for each chartpoint\nlet viewGenerator = {(chartPointModel: ChartPointLayerModel, layer: ChartPointsViewsLayer, chart: Chart) -> UIView? in\n    let viewSize: CGFloat = Env.iPad ? 30 : 20\n    let center = chartPointModel.screenLoc\n    let label = UILabel(frame: CGRect(x: center.x - viewSize \u002F 2, y: center.y - viewSize \u002F 2, width: viewSize, height: viewSize))\n    label.backgroundColor = UIColor.green\n    label.textAlignment = NSTextAlignment.center\n    label.text = chartPointModel.chartPoint.y.description\n    label.font = ExamplesDefaults.labelFont\n    return label\n}\n\n\u002F\u002F create layer that uses viewGenerator to display chartpoints\nlet chartPointsLayer = ChartPointsViewsLayer(xAxis: xAxisLayer.axis, yAxis: yAxisLayer.axis, chartPoints: chartPoints, viewGenerator: viewGenerator, mode: .translate)\n\n\u002F\u002F create chart instance with frame and layers\nlet chart = Chart(\n    frame: chartFrame,\n    innerFrame: innerFrame,\n    settings: chartSettings,\n    layers: [\n        xAxisLayer,\n        yAxisLayer,\n        guidelinesLayer,\n        chartPointsLayer\n    ]\n)\n\nview.addSubview(chart.view)\nself.chart = chart\n```\n\nLayers decide how to present their data - this can be done adding subviews, (CA)layers, with core graphics, etc.\n\n#### 2. View generators:\n\nView based layers will use a generator function to generate chart point views. This function receives the complete state of each chartpoint (model data, screen location) and produces an UIView, allowing any type of customization.\n\n### Hello world:\n\nThere's a [hello world](Examples\u002FExamples\u002FHelloWorld.swift) included in the examples, similar to the above code, with a bit more explanations. Change some properties of the generated views, copy paste the chartPointsLineLayer used in the snippet above, and pass it to the chart's layers, to display a line behind the views, and you have already mastered the main concepts!\n\n#### Important!\n\n* Don't forget to always keep a strong reference to the chart instance or it will be released, which leads to axis & labels not showing.\n\n* If you have a lot of axis labels in your chart it may be necessary to do the calculation of the coordinate space in the background, to avoid possible delays which are noticeable during transitions or scrolling. See ScrollExample or MultipleAxesExample example for this.\n\n## Tasks\n\nSwiftCharts has got now some [projects](https:\u002F\u002Fgithub.com\u002Fi-schuetz\u002FSwiftCharts\u002Fprojects) to plan features and improvements. Feel free to grab any of these topics even if it's just to add feedback. You can open an issue for this. Other options like opening a Slack channel are possible.\n\n## Created By:\n\nIvan Schütz\n\nIf you need something special or are just short of time, I'm also available for [hire](http:\u002F\u002Fwww.ivanschuetz.com\u002Fcontact-impressum.php)\n\n## Credits:\n\nA big thank you to the awesome [grafiti.io](https:\u002F\u002Fgrafiti.io\u002F) for having been sponsoring this project in the last months, and of course also to all the [contributors](https:\u002F\u002Fgithub.com\u002Fi-schuetz\u002FSwiftCharts\u002Fgraphs\u002Fcontributors)! \n\n## License\n\nSwiftCharts is Copyright (c) 2015 - 2019 Ivan Schütz and released as open source under the attached [Apache 2.0 license](LICENSE).\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThis is a port to Swift and (massively improved) continuation of an obj-c project which I did while working at eGym GmbH https:\u002F\u002Fgithub.com\u002Fegymgmbh\u002Fios-charts\n","SwiftCharts 是一个易于使用且高度可定制的 iOS 图表库。它支持多种图表类型，包括条形图、散点图、折线图、面积图、气泡图以及蜡烛图等，并允许用户自定义颜色、视图、单位、标签、动画、交互方式和轴等几乎所有元素。此外，该库采用了模块化架构，便于开发者创建新的图表类型或为现有图表添加效果。SwiftCharts 适用于需要在 iOS 应用中展示数据可视化内容的各种场景，如金融分析应用、健康追踪软件或是任何需要直观展示数据趋势的场合。尽管目前该项目已不再维护，但其丰富的功能与灵活性仍使其成为一个值得考虑的选择。",2,"2026-06-11 03:10:35","top_language"]