Comments (10)
可以参考官方的json的Demo:http://echarts.baidu.com/echarts2/doc/example/line6.html
from ios-echarts.
这个json我看过,Y轴里是个数组,但是iOS-Echarts里怎么添加可以实现啊?
from ios-echarts.
可以通过 PYOption
的的 addYAxis
方法,或者直接用 yAxisEqual(数组)
这两种方式都可以啊
from ios-echarts.
PYOption里addYAxis试过了,不管用。我看看你说的yAxisEqual可不可以
from ios-echarts.
yAxisEqual这个也不行
from ios-echarts.
我试了一下是可以的,不知道你为什么不行~
// 忽略前面~
.addXAxis([PYAxis initPYAxisWithBlock:^(PYAxis *axis) {
axis.typeEqual(PYAxisTypeCategory)
.boundaryGapEqual(@NO)
.addDataArr(@[@"周一",@"周二",@"周三",@"周四",@"周五",@"周六",@"周日"]);
}])
.addYAxis([PYAxis initPYAxisWithBlock:^(PYAxis *axis) {
axis.typeEqual(PYAxisTypeValue)
.axisLabelEqual([PYAxisLabel initPYAxisLabelWithBlock:^(PYAxisLabel *axisLabel) {
axisLabel.formatterEqual(@"{value} ℃");
}]);
}])
.addYAxis([PYAxis initPYAxisWithBlock:^(PYAxis *axis) {
axis.typeEqual(PYAxisTypeValue).axisLabelEqual([PYAxisLabel initPYAxisLabelWithBlock:^(PYAxisLabel *axisLabel) {
axisLabel.formatterEqual(@"{value} ℃");
}]);
}])
.addSeries([PYSeries initPYSeriesWithBlock:^(PYSeries *series) {
series.nameEqual(@"最高温度")
.typeEqual(PYSeriesTypeLine)
.dataEqual(@[@(11),@(11),@(15),@(13),@(12),@(13),@(10)])
.markPointEqual([PYMarkPoint initPYMarkPointWithBlock:^(PYMarkPoint *point) {
point.addDataArr(@[@{@"type" : @"max", @"name": @"最大值"},@{@"type" : @"min", @"name": @"最小值"}]);
}])
.markLineEqual([PYMarkLine initPYMarkLineWithBlock:^(PYMarkLine *markLine) {
markLine.addDataArr(@[@{@"type" : @"average", @"name": @"平均值"}]);
}]);
}])
.addSeries([PYCartesianSeries initPYCartesianSeriesWithBlock:^(PYCartesianSeries *series) {
series.yAxisIndexEqual(@1).nameEqual(@"最低温度")
.typeEqual(PYSeriesTypeLine)
.dataEqual(@[[NSNull null],@(-2),[NSNull null],@(5),@(3),[NSNull null],@(0)])
.markPointEqual([PYMarkPoint initPYMarkPointWithBlock:^(PYMarkPoint *point) {
point.addDataArr(@[@{@"value" : @(2), @"name": @"周最低", @"xAxis":@(1), @"yAxis" : @(-1.5)}]);
}])
.markLineEqual([PYMarkLine initPYMarkLineWithBlock:^(PYMarkLine *markLine) {
markLine.addDataArr(@[@{@"type" : @"average", @"name": @"平均值"}]);
}]);
}]);
from ios-echarts.
from ios-echarts.
我是在stackedLineOption里试的,这个不行么
from ios-echarts.
我知道问题了,series里我没有指定yAxisIndex导致的,再加上这个就没问题了,谢谢
from ios-echarts.
还有个问题。。
两边的Y轴可以共用一个网格线吗,像你的截图里,两边的Y轴点是一样的,但是各画各的网格线了
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.