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

箱线图样式问题 #158

Closed
yuexuanchen opened this issue Sep 19, 2022 · 3 comments
Closed

箱线图样式问题 #158

yuexuanchen opened this issue Sep 19, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@yuexuanchen
Copy link

请问箱线图顶部和底部的横线样式有开放的方法可以直接控制样式吗?

@AAChartModel AAChartModel added the enhancement New feature or request label Sep 19, 2022
@AAChartModel
Copy link
Owner

@AAChartModel
Copy link
Owner

AAChartModel commented Sep 21, 2022

Java 版本的写法:

    public static AAOptions configureBoxplotChartWithSpecialStyle() {
        AAChartModel aaChartModel = new AAChartModel()
                .chartType(AAChartType.Boxplot)//图表类型
                .title("BOXPLOT CHART")//图表主标题
                .subtitle("virtual data")//图表副标题
                .yAxisTitle("℃")//设置 Y 轴标题
                .yAxisVisible(true)//设置 Y 轴是否可见
                .series(new AASeriesElement[]{
                        new AASeriesElement()
                                .name("Observed Data")
                                .color("#ef476f")
                                .fillColor("#04d69f")
                                .data(new Object[][]{
                                        {760, 801, 848, 895, 965},
                                        {733, 853, 939, 980, 1080},
                                        {714, 762, 817, 870, 918},
                                        {724, 802, 806, 871, 950},
                                        {834, 836, 864, 882, 910}
                                }),
                });

        AAOptions aaOptions = aaChartModel.aa_toAAOptions();

        aaOptions.plotOptions
                .boxplot(new AABoxplot()
                        .boxDashStyle(AAChartLineDashStyleType.Dash)
                        .fillColor("#F0F0E0")
                        .lineWidth(2)
                        .medianColor("#0C5DA5")
                        .medianDashStyle(AAChartLineDashStyleType.ShortDot)
                        .medianWidth(3)
                        .stemColor("#A63400")
                        .stemDashStyle(AAChartLineDashStyleType.Dot)
                        .stemWidth(1)
                        .whiskerColor("#3D9200")
                        .whiskerDashStyle(AAChartLineDashStyleType.Solid)
                        .whiskerLength("60%")
                        .whiskerWidth(6)
                );

        aaOptions.plotOptions.series
                .pointWidth(100);

        return aaOptions;
    }

AAChartModel added a commit that referenced this issue Sep 21, 2022
@AAChartModel
Copy link
Owner

备注:

新增的 AABoxplot 需要更新 AAChartCore 至最新内容, 方可使用.

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

No branches or pull requests

2 participants