Comments (7)
@hjqiaho 你可以显示的时候通过formatter来进行调整
from ios-echarts.
@Pluto-Y 是像这样吗 具体formatter的值怎么写呢
NSMutableDictionary *trigger = [NSMutableDictionary dictionary];
[trigger setObject:@"axis" forKey:@"trigger"];
[trigger setObject:@"{b}
{a0}:{c0}" forKey:@"formatter"];
NSDictionary *radar = @{
@"legend":legend,
@"polar":polararray,
@"series":seriesarray,
@"tooltip":trigger,
@"title":[NSDictionary dictionaryWithObject:@"各科能力雷达图" forKey:@"text"]
from ios-echarts.
你用的是哪一个版本你的iOS-Echarts,你用radar来设置option吗?还是怎么样?能贴一些关于你option的代码吗
from ios-echarts.
NSArray *templist = list[@"list"];
NSMutableArray *indicatortemp = [NSMutableArray array];
NSMutableArray *radarvalue = [NSMutableArray array];
for (int i = 0; i<templist.count; i++) {
NSDictionary *tempblank = @{@"max":@(-10),@"min":@(0),@"text":templist[i][@"blankName"]};
NSInteger rank = [[NSString stringWithFormat:@"%@",templist[i][@"rank"]] integerValue];
[indicatortemp addObject:tempblank];
[radarvalue addObject:@(-rank)];
}
NSArray *legenddata = @[@"学科排名"];
NSDictionary *legend = [NSDictionary dictionaryWithObjectsAndKeys:@"vertical",@"orient",@"right",@"x",@"bottom",@"y",legenddata,@"data",nil];
NSArray *polararray = @[ @{@"radius": @"80%",@"indicator":indicatortemp,@"scale":@(YES)},];
NSArray *seriesarray = @[@{@"name": @"各学科排名",@"sort":@"descending",@"type": @"radar",@"data":@[
@{@"name":@"学科排名",
@"value":radarvalue}
]}
];
NSMutableDictionary *trigger = [NSMutableDictionary dictionary];
[trigger setObject:@"axis" forKey:@"trigger"];
[trigger setObject:@"{b}
{c}:{c0}" forKey:@"formatter"];
NSDictionary *radar = @{
@"legend":legend,
@"polar":polararray,
@"series":seriesarray,
@"tooltip":trigger,
@"title":[NSDictionary dictionaryWithObject:@"各科能力雷达图" forKey:@"text"]
};
PYOption *option = [RMMapper objectWithClass:[PYOption class] fromDictionary:radar];
[_kEchartView setOption:option];
[_kEchartView loadEcharts];
就是这段代码 版本就是前几天在这个git下载的
from ios-echarts.
@hjqiaho 可以修改这下面的,应该是c0或者c前面加一个负号试试,建议使用原声属性来进行设置,你这种方式如果设置了多余的属性是不会有提示的,具体的demo看github上的demo
[trigger setObject:@"{b}{c}:{c0}" forKey:@"formatter"];
from ios-echarts.
加上负号就不返回数值或文字了 直接显示 {-c}
有没有直接倒序显示的方法?
from ios-echarts.
[label setObject:@"(function(params) {return -params.value;})" forKey:@"formatter"];
这么写解决了
from ios-echarts.
Related Issues (20)
- Echarts 4.0 您这边还更新吗
- 有没有4.0呢
- 手动导入报很多编译错误 HOT 3
- 怎么隐藏指示线呢?大神
- 柱状图颜色渐变通过什么设置? HOT 1
- WKweb 有闪退
- echarts rich富文本属性 该怎么设置
- 如何让Y轴的刻度自适应宽度呢?
- 怎么完全去掉UIWebView HOT 4
- Does iOS-Echarts support GL charts like Scatter GL, Line GL, Flow GL and Graph GL?
- 赶紧更新、赶紧更新、赶紧更新、急急急 HOT 6
- Does iOS-Echarts support heatmap on cartesian?
- barMinHeight设置没有效果
- iOS14 bate 无法显示图表
- 混合柱状图支持吗 HOT 1
- 请问还有人在维护吗?怎么实现PYTooltip像H5里鼠标滑动那种效果
- iOS开发,点击分支的事件回调!
- 可以更新吗,没办法通过机审
- iOS折线图中,只有点击小圆点的时候 才会触发click,如何在点击图表所有区域内添加点击回调事件,并获取到对应数据?急急急
- 请问可以绘制市级的地图吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ios-echarts.