Code Monkey home page Code Monkey logo

不好意思,想问下,折线图的多条路径能否反向生成,就是第一项指标对应的路径在最上边,然后第二项在下边,依次类推,我的意思是能否自由设置添加路径的顺序 about aachartkit HOT 4 CLOSED

aachartmodel avatar aachartmodel commented on May 16, 2024
不好意思,想问下,折线图的多条路径能否反向生成,就是第一项指标对应的路径在最上边,然后第二项在下边,依次类推,我的意思是能否自由设置添加路径的顺序

from aachartkit.

Comments (4)

AAChartModel avatar AAChartModel commented on May 16, 2024

给个设计的效果图呗,你这样的描述让我很难明白你实际的具体需求呀!

from aachartkit.

ZFKK avatar ZFKK commented on May 16, 2024

img_2070
img_2069
实际要求的曲线顺序是2069,而现在的是2070的,现在需要的就是更改顺序

from aachartkit.

ZFKK avatar ZFKK commented on May 16, 2024

补充一下,2069指的是第二张图,也就是现在需要的,而现在的效果是第一张图,也就是2070

from aachartkit.

AAChartModel avatar AAChartModel commented on May 16, 2024

我大概明白你的需求了, 你如果想要改变某一个颜色的图层的层次,其实只要调整 AAChartModel的属性series的数组中的数组的先后顺序就可以了.比如你这样配置 AAChartModel :

 self.chartModel= AAObject(AAChartModel)
    .chartTypeSet(chartType)
    .titleSet(@"编程语言热度")
    .subtitleSet(@"虚拟数据")
    .categoriesSet(@[@"Java",@"Swift",@"Python",@"Ruby", @"PHP",@"Go",@"C",@"C#",@"C++"])
    .yAxisTitleSet(@"摄氏度")
    .pointHollowSet(true)
    .seriesSet(@[
                 AAObject(AASeriesElement)
                 .nameSet(@"2018")
                 .dataSet(@[@45,@56,@34,@43,@65,@56,@47,@28,@49]),
                 
                  AAObject(AASeriesElement)
                 .nameSet(@"2019")
                 .dataSet(@[@31,@22,@33,@54,@35,@36,@27,@38,@39]),
                 
                 AAObject(AASeriesElement)
                 .nameSet(@"2020")
                 .dataSet(@[@21,@22,@19,@24,@33,@26,@18,@28,@33]),
                 ]
               )
    ;

渲染的图表如下图所示
36aadcac-db21-460d-8dea-280b460d8f8a

你再调整AAChartModel 的属性series (数组)元素的先后顺序为

seriesSet(@[
                 AAObject(AASeriesElement)
                 .nameSet(@"2020")
                 .dataSet(@[@21,@22,@19,@24,@33,@26,@18,@28,@33]),
                 
                  AAObject(AASeriesElement)
                 .nameSet(@"2019")
                 .dataSet(@[@31,@22,@33,@54,@35,@36,@27,@38,@39]),
                 
                 AAObject(AASeriesElement)
                 .nameSet(@"2018")
                 .dataSet(@[@45,@56,@34,@43,@65,@56,@47,@28,@49]),
                 ]
               )

这时候渲染的图形效果如下
3dcd1a72-6e3d-4b5e-baca-5c2ba1cf7af5

经过如上的改动 AAChartModel 的属性series(数组) 的元素的先后顺序,图表的图层上下层的先后顺序效果也就相应的改变了.

from aachartkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.