AAChartModel / AAChartCore

📈📊☕️☕️☕️An elegant modern declarative data visualization chart framework for Android. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types.极其精美而又强大的 Android 数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.
Apache License 2.0
921 stars 129 forks source link

可以实现重叠柱状图吗 #195

Closed qizhengzheng closed 3 months ago

qizhengzheng commented 3 months ago

可以实现重叠柱状图吗 image 下面这几种图能实现吗 image image image

AAChartModel commented 3 months ago

堆叠柱状图是支持的, 参考 OC 版本的相关问题:

AAChartModel commented 3 months ago

其他几种图形化的柱状图无法支持.

qizhengzheng commented 3 months ago

我想要实现叠和echart 中 barGap: '-100%'的效果,

AAChartModel commented 3 months ago

echart 中 barGap: '-100%'的效果

不太明白这是什么效果

qizhengzheng commented 3 months ago

柱状图是重叠在一起,不是累加

AAChartModel commented 3 months ago

柱状图是重叠在一起,不是累加

参考:

AAChartModel commented 3 months ago
AAChartModel commented 3 months ago

参考 JS 在线示例:

qizhengzheng commented 3 months ago

Java版本的支持吗

柱状图是重叠在一起,不是累加

参考:

AAChartModel commented 3 months ago

对应的 Java 版本代码如下:

    //https://github.com/AAChartModel/AAChartKit/issues/1269
    public static AAChartModel noMoreGroupingAndOverlapEachOtherColumnChart() {
        return new AAChartModel()
                .chartType(AAChartType.Column)
                .categories(new String[]{"11/23", "11/24", "11/25", "11/26", "11/27", "11/28", "11/29"})
                .yAxisMax(50)
                .yAxisMin(0)
                .borderRadius(5)
                .series(new AAColumn[]{
                        new AAColumn()
                                .name("总做题")
                                .color("#D8D8D8")
                                .data(new Object[]{30, 20, 28, 40, 42, 48, 50})
                                .grouping(false)
                        ,
                        new AAColumn()
                                .name("正确做题")
                                .color("#00D9CD")
                                .data(new Object[]{28, 18, 26, 40, 40, 46, 39})
                });
    }

    //https://github.com/AAChartModel/AAChartKit/issues/1271
    public static AAChartModel noMoreGroupingAndNestedColumnChart() {
        return new AAChartModel()
                .chartType(AAChartType.Column)
                .categories(new String[]{"11/23","11/24", "11/25","11/26","11/27","11/28","11/29"})
                .yAxisMax(50)
                .yAxisMin(0)
                .borderRadius(5)
                .series(new Object[]{
                        new AAColumn()
                                .name("总目标")
                                .color("DeepSkyBlue")
                                .data(new Object[]{30, 20, 28, 40, 42, 48, 50})
                                .grouping(false)
                                .pointPadding(0.05f)
                        ,
                        new AAColumn()
                                .name("完成度")
                                .color("#FF3030") //Firebrick1 color
                                .data(new Object[]{28, 18, 26, 40, 40, 46, 39})
                                .grouping(false)
                                .pointPadding(0.2f)
                });
    }
AAChartModel commented 3 months ago

以上 Java 版本的示例代码, 你都可以在 AAChartCoredemo 中找到.

qizhengzheng commented 3 months ago

可以了,谢谢

qizhengzheng commented 3 months ago

image 怎么配置这样XY轴的name

AAChartModel commented 3 months ago

image 怎么配置这样XY轴的name

参考: