Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大佬,这个睡眠图会串色,就是正常的应该是紫色的,就是最右边的那个颜色,这个怎么处理呢 #438

Open
wcb133 opened this issue Jul 18, 2023 · 6 comments

Comments

@wcb133
Copy link

wcb133 commented Jul 18, 2023

大佬,这个睡眠图会串色,就是正常的应该是紫色的,就是最右边的那个颜色,这个怎么处理呢
image

设置代码如下:

let option = AAOptions()
            .chart(AAChart()
                .type(.xrange)
                .margin(top: 0, right: 0, bottom: 25, left: 0))
            .title(AATitle().text(""))
            .colors(["#4026E5","#AC60DF","#E1907B","#EEC967"])
            .xAxis(AAXAxis().visible(false))
            .yAxis(AAYAxis().visible(false)
                .title(AATitle()
                    .text(""))
                .categories(["","","",""])
                .gridLineWidth(0))
            .legend(AALegend()
                .enabled(false))
            .tooltip(AATooltip()
                .enabled(false))
            .plotOptions(AAPlotOptions()
                .series(AASeries()
                    .pointPadding(0)
                    .groupPadding(0)))
            .series([AASeriesElement()
                .borderRadius(4)
                .data([])])

        sleepChartView.aa_drawChartWithChartOptions(option)
@wcb133
Copy link
Author

wcb133 commented Jul 18, 2023

有什么需要注意设置的么

@AAChartModel
Copy link
Owner

应该不会有这种 bug 吧, 你看 demo 中, 十几行数据, 也没有串色啊, 你是不是手动给 data 数组中的元素加了颜色的设置了?

@MoShenGuo
Copy link

你好,这个图是在demo哪一行点击进去了?我点击很多行都没有用,求告知

@AAChartModel
Copy link
Owner

AAChartModel commented Aug 3, 2023

@MoShenGuo 睡眠图其实是 AAChartKit-SwiftPro 版本中的图表类型 xrange

AAChartKit-Swift-Pro 项目地址链接:

@AAChartModel
Copy link
Owner

@AAChartModel
Copy link
Owner

AAChartModel commented Aug 3, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants