{"id":13531828,"url":"https://github.com/Pluto-Y/iOS-Echarts","last_synced_at":"2025-04-01T20:30:36.130Z","repository":{"id":37663757,"uuid":"41879478","full_name":"Pluto-Y/iOS-Echarts","owner":"Pluto-Y","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-23T12:18:11.000Z","size":14077,"stargazers_count":1916,"open_issues_count":55,"forks_count":319,"subscribers_count":57,"default_branch":"Echarts3","last_synced_at":"2025-03-31T03:09:39.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pluto-Y.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-09-03T19:27:10.000Z","updated_at":"2025-03-24T09:45:01.000Z","dependencies_parsed_at":"2024-01-13T23:53:15.549Z","dependency_job_id":"44fec5ff-b914-43bf-9738-26eb9e43f6e9","html_url":"https://github.com/Pluto-Y/iOS-Echarts","commit_stats":{"total_commits":419,"total_committers":6,"mean_commits":69.83333333333333,"dds":"0.019093078758949833","last_synced_commit":"ba07942435a550a0a6cd008669d8e6685cfccf97"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pluto-Y%2FiOS-Echarts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pluto-Y%2FiOS-Echarts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pluto-Y%2FiOS-Echarts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pluto-Y%2FiOS-Echarts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pluto-Y","download_url":"https://codeload.github.com/Pluto-Y/iOS-Echarts/tar.gz/refs/heads/Echarts3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709921,"owners_count":20821296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:01:06.056Z","updated_at":"2025-04-01T20:30:36.094Z","avatar_url":"https://github.com/Pluto-Y.png","language":"Objective-C","funding_links":[],"categories":["Languages","Objective-C","Objective-C  Stars 1000以内排名整理"],"sub_categories":["iOS"],"readme":"# iOS- Echarts - A control build with echarts  \n[中文文档](https://github.com/Pluto-Y/iOS-Echarts/tree/master/Doc) \n\n[![Build Status](https://travis-ci.org/Pluto-Y/iOS-Echarts.svg)](https://travis-ci.org/Pluto-Y/iOS-Echarts)  [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/iOS-Echarts.svg)](https://img.shields.io/cocoapods/v/iOS-Echarts.svg)\n\n____\n\nThis is a highly custom chart control for iOS and Mac apps, which build with the Echart(Echart2). It just encapsulate the conrol of the javascript. It provides a chainable way of describing your configurations for the echarts.  It's convinient for foucing on the logic of the app and optimizing the code. It avoid diverting developers' mind on the interaction between javascript and Objective-C.\n\n\u003e Tips: If you want to use even iOS8.0, I suggest you use `WKEchartsView` which is based on `WKWebView`. The interface of `WKEchartsView` is same as `PYEchartsView`, so if you are using `PYEchartsView`, you just change `PYEchartsView` into `WKEchartsView`.\n\nIf you like this control, please star it. It can make me pay more attention on it.\n\nAnd also if you find a issue, please [issue me]((https://github.com/Pluto-Y/iOS-Echarts/issues/new)).\nPull requests are warmly welcome as well.\n\n![screen-shot](https://raw.githubusercontent.com/Pluto-Y/iOS-Echarts/master/Doc/Demos.gif) ![screen-shot](https://raw.githubusercontent.com/Pluto-Y/iOS-Echarts/master/Doc/Demos1.gif)\n\n# Echarts Informations\n\n___\n\n[Echarts Github](https://github.com/ecomfe/echarts)\n\n[Echarts WebSite(English)](http://echarts.baidu.com/echarts2/index-en.html)\n\n\n# Installation\n\n___\n\nThere are two ways to use iOS-Echarts in you project:\n\n* Using cocoapods:`pod iOS-Echarts`\n* Manually:\n    * First, copying all the files into you project\n    * Second, `Remove references`the directory named 'js'\n    * Finnaly, add the directory named 'js' and 'theme' by `create floder references`\n\n⚠️  *** Please Be Sure The Color Of `js` and `theme` Directory Is Blue. *** ⚠️  \n\nYou should import one header file in your project:`iOS-Echarts.h` when you will use it.\nFinally you just need to initialze the PYEchartsView and PYOption you need. \n\nIf you don't know how to set the right value for the option, you can check the documents in the [EChart Website](http://echarts.baidu.com/echarts2/).\n\n# Usage\n\n___\n\n### The common step like the under codes:\n\n```\n// Firstly, you should have a instance of PYEchartsView\n@property (weak, nonatomic) IBOutlet PYEchartsView *echartsView;\n\n...\n\nPYOption *option = ... // Then, configure something about options\n// Finally, load echarts view\n[_echartsView setOption:option]; \n[_echartsView loadEcharts];\n```\n\n### All properties setter are chainable, you can use `[property-name]Equal`\n\n```\nPYOption *option = [PYOption initPYOptionWithBlock:^(PYOption *option) {\n\n    option.titleEqual([PYTitle initPYTitleWithBlock:^(PYTitle *title) {\n        title.textEqual(@\"Event River\").subtextEqual(@\"Test subtext\");\n    }])\n    .tooltipEqual([PYTooltip initPYTooltipWithBlock:^(PYTooltip *tooltip) {\n        tooltip.triggerEqual(PYTooltipTriggerItem).enterableEqual(YES);\n    }])\n    .legendEqual([PYLegend initPYLegendWithBlock:^(PYLegend *legend) {\n        legend.dataEqual(@[@\"first data\", @\"second data\"]);\n    }])\n    .toolboxEqual([PYToolbox initPYToolboxWithBlock:^(PYToolbox *toolbox) {\n        toolbox.showEqual(YES).featureEqual([PYToolboxFeature initPYToolboxFeatureWithBlock:^(PYToolboxFeature *feature) {\n            feature.markEqual([PYToolboxFeatureMark initPYToolboxFeatureMarkWithBlock:^(PYToolboxFeatureMark *mark) {\n                mark.showEqual(YES);\n            }])\n            .restoreEqual([PYToolboxFeatureRestore initPYToolboxFeatureRestoreWithBlock:^(PYToolboxFeatureRestore *restore) {\n                restore.showEqual(YES);\n            }]);\n        }]);\n    }])\n    .xAxisEqual([[NSMutableArray alloc] initWithArray:@[axis]])\n    .seriesEqual([[NSMutableArray alloc] initWithArray:@[series1, series2]])\n    .gridEqual([PYGrid initPYGridWithBlock:^(PYGrid *grid) {\n        grid.xEqual(@10)\n        .x2Equal(@30);\n    }]);\n}];\n```\n\n### Many properties support add[Name] and add[Name]Arr methods, when you use properties which type is  `NSMutableArray`, you should try `add` method first\n\n```\noption.addXAxis(//Something about PYAxis)\n.addYAxis(//Something about PYAxis)\n.addSeries(//Something about PYSeries or sub class of PYSeries)\n```\n\n### When you use the instance which is subclass of `PYSeries`, you should assign value for the property of subclass, then assign value for `PYSeries`, like this:\n\n```\n.addSeries([PYCartesianSeries initPYCartesianSeriesWithBlock:^(PYCartesianSeries *series) {\n    series.stackEqual(@\"Total\")\n    .smoothEqual(YES)\n    .symbolEqual(PYSymbolArrow)\n    .symbolSizeEqual(@6)\n    .symbolRotateEqual(@(-45))\n    .nameEqual(@\"Data1\")\n    .typeEqual(PYSeriesTypeLine)\n    .itemStyleEqual([PYItemStyle initPYItemStyleWithBlock:^(PYItemStyle *itemStyle) {\n        itemStyle.normalEqual([PYItemStyleProp initPYItemStylePropWithBlock:^(PYItemStyleProp *normal) {\n            normal.colorEqual(PYRGBA(255, 0, 0, 1))\n            .lineStyleEqual([PYLineStyle initPYLineStyleWithBlock:^(PYLineStyle *lineStyle) {\n                lineStyle.widthEqual(@2).typeEqual(PYLineStyleTypeDashed);\n            }]);\n        }]).emphasisEqual([PYItemStyleProp initPYItemStylePropWithBlock:^(PYItemStyleProp *emphasis) {\n            emphasis.colorEqual(PYRGBA(0, 0, 255, 1));\n        }]);\n    }])\n    .dataEqual(@[@(320), @(332), @\"-\", @(334), @{@\"value\":@(390),@\"symbol\":@\"star6\",@\"symbolSize\":@(20),@\"symbolRotate\":@(10),@\"itemStyle\":@{@\"normal\":@{@\"color\":@\"yellowgreen\"},@\"emphasis\":@{@\"color\":@\"orange\",@\"lable\":@{@\"show\":@(YES),@\"position\":@\"inside\",@\"textStyle\":@{@\"fontSize\":@(20)}}}}}, @(330), @(320)]);\n}])\n```\n\nThe `PYCartesianSeries` is subclass of `PYSeries`, and `stack`, `smooth`, `symbol`, `symbolSize` and `symbol` are the properties of `PYCartesianSeries`. So you should assign them before the properies of `PYSeries`.\n\n### You also can assign all values one by one:\n\n\n```\nPYEventRiverSeries *series1 = [PYEventRiverSeries initPYEventRiverSeriesWithBlock:^(PYEventRiverSeries *series) {\n    series.weight = @123;\n    series.name = @\"Series name\";\n    series.type = PYSeriesTypeEventRiver;\n}];\n```\n\n### All propertis can use `init[Type]WithBlock` for creation:\n\n```\nPYAxis *axis = [PYAxis initPYAxisWithBlock:^(PYAxis *axis) {\n    axis.typeEqual(PYAxisTypeTime).boundaryGapEqual(@[@0.05, @0.1]);\n}];\n```\n\n# Contact\n\n___\n\nFollow and contact me on [Twitter](https://twitter.com/youtk21ai) or [Sina Weibo](http://weibo.com/5690716723/info). And if you want to contribute with this projust, please contact me as well.\n\nIf you have QQ, you can join the group which number is 485591970.\n\n# Licenses\n\n___\n\nAll source code is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPluto-Y%2FiOS-Echarts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPluto-Y%2FiOS-Echarts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPluto-Y%2FiOS-Echarts/lists"}