Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
AAChartModel committed Mar 20, 2024
1 parent a95b78b commit ceb6eb7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ class AAChartModelListVC: AABaseListVC {
"connectNullsForSingleAASeriesElement---为单个 AASeriesElement 单独设置是否断点重连",
"lineChartsWithLargeDifferencesInTheNumberOfDataInDifferentSeriesElement---测试有多组数据时, 数据量较大时, 不同组数据量差距较大时的折线图📈",
"customAreasplineChartWithColorfulGradientColorZones---彩色渐变色区域填充图",

],
/*Mixed Chart*/
[
Expand Down Expand Up @@ -263,8 +262,6 @@ class AAChartModelListVC: AABaseListVC {
"showAARadialGradientPositionAllEnumValuesWithBubbleChart",
],



]

chartTypeArr = [
Expand Down Expand Up @@ -431,6 +428,7 @@ extension AAChartModelListVC {

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
switch indexPath.section {

case 0:
let vc = BasicChartVC()
vc.chartType = chartTypeArr[indexPath.section][indexPath.row] as? AAChartType
Expand Down
12 changes: 5 additions & 7 deletions AAInfographicsDemo/Demo/AAChartListVC/AAOptionsListVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,21 @@ class AAOptionsListVC: AABaseListVC {
"configureComplicatedCustomStepAreaChart2---复杂自定义阶梯折线填充图 2",
"configureComplicatedCustomStepAreaChart3---复杂自定义阶梯折线填充图 3",
],

[
"doubleXAxesAndDoubleYAxesChart---",
"disableGroupingBoxplotMixedScatterChart---",
],

[
"scatterChartWithJitter---",
"boxPlotMixedScatterChartWithJitter---"
],

[
"pieDonutChart---",
],

[
"disableGroupingColumnChart---",
"disableGroupingBarChart---"
Expand All @@ -137,12 +141,7 @@ extension AAOptionsListVC {

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
switch indexPath.section {
// "LineChartOptions--- 通过 Options 绘制折线📈图",
// "AreaChartOptions--- 通过 Options 绘制折线填充图",
// "MultiYAxesChartOptionsVC---通过 Options 绘制多 Y 轴图",
// "ScatterChartOptionsVC---通过 Options 绘制散点图",
// "PieChartOptionsVC---通过 Options 绘饼图",
// "ColumnChartOptionsVC---通过 Options 绘制条形图",

case 0:
/*Draw Chart With AAOptions Instance Object*/
let vc = DrawChartWithAAOptionsVC()
Expand All @@ -151,7 +150,6 @@ extension AAOptionsListVC {
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)


case 1:
/*Line Chart Options*/
let vc = LineChartOptionsVC()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,16 @@ class AAOptionsWithJSListVC: AABaseListVC {
title = "AAOptionsWithJS"

sectionTitleArr = [

"JS Function For AAOptionns | 通过带有 JS 函数的 Options 绘图",

"JS Function For AAAxis Labels | 通过带有 JS 函数的自定义 AAAxis 的文字标签",
"JS Function For AALegend | 通过带有 JS 函数的自定义 AALegend",
"JS Function For AAChartEvents---通过 JSFunction 自定义 AAChartEvents 的事件",
"JS Function For AAChartEvents2---通过 JSFunction 自定义 AAChartEvents 的事件",
"JS Function For AAOptions---通过 JSFunction 自定义 AAOptions 内容",


]

chartTypeTitleArr = [

/*JavaScript Formatter Function */
[
"customAreaChartTooltipStyleWithSimpleFormatString---简单字符串拼接",
Expand All @@ -45,7 +41,6 @@ class AAOptionsWithJSListVC: AABaseListVC {
"customTooltipWhichDataSourceComeFromOutSideRatherThanSeries---通过来自外部の数据源来自定义 tooltip (而非常规の来自图表の series)",
"customAreasplineChartTooltipStyleByDivWithCSS---通过自定义 div 的 css 样式来自定义复杂效果的 tooltip 浮动提示框",
],

/*JS Function For AAAXis Labels*/
[
"customYAxisLabels---自定义Y轴文字",
Expand Down Expand Up @@ -85,7 +80,6 @@ class AAOptionsWithJSListVC: AABaseListVC {
[
"addClickEventToXAxisLabelAndAccessData---为 X 轴文字标签添加点击事件并获取到所点击的点的信息",
"defaultSelectedAPointForLineChart---默认选中折线图的一个点 marker",

],
/*JS Function For AAOptions*/
[
Expand All @@ -94,7 +88,6 @@ class AAOptionsWithJSListVC: AABaseListVC {
"customizeEveryDataLabelSinglelyByDataLabelsFormatter---通过 formatter 来自定义单个 dataLabels 元素",
"configureColorfulDataLabelsForPieChart---为饼图配置多彩 dataLabels"
],


]

Expand All @@ -119,7 +112,6 @@ extension AAOptionsWithJSListVC {
vc.navigationItemTitleArr = chartTypeTitleArr[indexPath.section]
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)


case 1:
/*JS Function For AAAxis Labels*/
Expand All @@ -128,27 +120,31 @@ extension AAOptionsWithJSListVC {
vc.navigationItemTitleArr = chartTypeTitleArr[indexPath.section]
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)

case 2:
/*JS Function For AALegend*/
let vc = JSFunctionForAALegendVC()
vc.selectedIndex = indexPath.row
vc.navigationItemTitleArr = chartTypeTitleArr[indexPath.section]
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)

case 3:
/*JS Function For AAChartEventsVC*/
let vc = JSFunctionForAAChartEventsVC()
vc.selectedIndex = indexPath.row
vc.navigationItemTitleArr = chartTypeTitleArr[indexPath.section]
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)

case 4:
/*JS Function For AAChartEventsVC2*/
let vc = JSFunctionForAAChartEventsVC2()
vc.selectedIndex = indexPath.row
vc.navigationItemTitleArr = chartTypeTitleArr[indexPath.section]
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)

case 5:
/*JS Function For AAOptions*/
let vc = JSFunctionForAAOptionsVC()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class AdvancedFeaturesListVC: AABaseListVC {
"Custom Chart StackLabel Sample ",
"Support Dragging Chart On X Axis",
],

/*Scrolling update chart data*/
[ "Column Chart---柱形图",
"Bar Chart---条形图",
Expand Down Expand Up @@ -200,7 +199,6 @@ class AdvancedFeaturesListVC: AABaseListVC {
AAChartType.spline,
AAChartType.scatter
],

/*Data Sorting With Animation Charts*/
[
AAChartType.column,
Expand Down Expand Up @@ -235,6 +233,7 @@ extension AdvancedFeaturesListVC {

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
switch indexPath.section {

case 0:
/*Only Refresh Chart Data Dynamiclly*/
let vc = OnlyRefreshChartDataVC()
Expand Down Expand Up @@ -287,9 +286,7 @@ extension AdvancedFeaturesListVC {
vc.sampleChartTypeIndex = indexPath.row
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)



case 5:
/*Scrolling update Chart Data Dynamiclly*/
let vc = ScrollingUpdateDataVC()
Expand Down
20 changes: 2 additions & 18 deletions AAInfographicsDemo/Demo/AAChartListVC/OfficialSamplesListVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ class OfficialSamplesListVC: AABaseListVC {
"arearangeAndLineChart---区域范围图和折线图混合图",
],

// case 0: return BarOrColumnChartOptionsComposer.basicBarChart()//基础柱状图
// case 1: return BarOrColumnChartOptionsComposer.stackingBarChart()//堆积柱状图
// case 2: return BarOrColumnChartOptionsComposer.populationPyramidChart()//人口金字塔图
// case 3: return BarOrColumnChartOptionsComposer.basicColumnChart()//基础条形图
// case 4: return BarOrColumnChartOptionsComposer.basicColumnChartWithNegativeValue()//带有负值的条形图
// case 5: return BarOrColumnChartOptionsComposer.basicColumnChartWithStackedDataLabels()//带有数据标签的堆积条形图
// case 6: return BarOrColumnChartOptionsComposer.basicColumnChartWithStackedDataLabels2()//带有数据标签的堆积条形图2
// case 7: return BarOrColumnChartOptionsComposer.percentStackedColumnChart()//百分比堆积条形图
// case 8: return BarOrColumnChartOptionsComposer.columnChartWithRotatedLabels()//带有旋转标签的条形图
// case 9: return BarOrColumnChartOptionsComposer.columnChartWithNestedColumn()//嵌套条形图
// case 10:return BarOrColumnChartOptionsComposer.columnRangeChart()//条形范围图
[
"basicBarChart---基础柱状图",
"stackingBarChart---堆积柱状图",
Expand All @@ -63,13 +52,6 @@ class OfficialSamplesListVC: AABaseListVC {
"columnRangeChart---条形范围图",
],

// case 0: return PieChartOptionsComposer.basicPieChart()//基本饼状图
// case 1: return PieChartOptionsComposer.basicPieChartWithLegend()//带有图例的基本饼状图
// case 2: return PieChartOptionsComposer.basicPieChartWithGradientColor()//带有渐变色的基本饼状图
// case 3: return PieChartOptionsComposer.basicPieChartWithGradientColor2()//带有渐变色的基本饼状图
// case 4: return PieChartOptionsComposer.basicPieChartWithMonochromeColor()//带有单色的基本饼状图
// case 5: return PieChartOptionsComposer.customPieChartTitlePosition()//自定义饼状图标题位置

[
"basicPieChart---基本饼状图",
"basicPieChartWithLegend---带有图例的基本饼状图",
Expand All @@ -94,13 +76,15 @@ extension OfficialSamplesListVC {

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
switch indexPath.section {

case 0:
/*Official Samples For Area Chart*/
let vc = OfficialAreaChartVC()
vc.selectedIndex = indexPath.row
vc.navigationItemTitleArr = chartTypeTitleArr[indexPath.section]
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)

case 1:
/*Official Samples For Bar or Column Chart*/
let vc = OfficialBarOrColumnChartVC()
Expand Down

0 comments on commit ceb6eb7

Please sign in to comment.