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

无法初始化F2雷达图 #99

Open
xuxiaoyang883 opened this issue Dec 30, 2021 · 0 comments
Open

无法初始化F2雷达图 #99

xuxiaoyang883 opened this issue Dec 30, 2021 · 0 comments

Comments

@xuxiaoyang883
Copy link

  • Link:
  • Platform:
  • Mini Showcase(like screenshots):

1.使用my-f2封装组件,使用官网雷达图实例,无法初始化雷达图
axml代码:



js代码:
Page({
data: {},
onLoad() {
},
onInitChart(F2, config,context) {
const chart = new F2.Chart(config);
const recentOneMonth = [{
name: '超大盘能力',
value: 6.5
}, {
name: '抗跌能力',
value: 9.5
}, {
name: '稳定能力',
value: 9
}, {
name: '绝对收益能力',
value: 6
}, {
name: '选证择时能力',
value: 6
}, {
name: '风险回报能力',
value: 8
}];

  chart.source(recentOneMonth, {
    value: {
    min: 0,
    max: 10
  }
  });
  console.log(chart)
  chart.coord('polar');
chart.tooltip(false); // 关闭 tooltip
chart.axis('value', {
  grid: {
    lineDash: null
  },
  label: null,
  line: null
});
chart.axis('name', {
  grid: {
    lineDash: null
  }
})
chart.area().position('name*value').color('#FE5C5B').style({
  fillOpacity: 0.2
}).animate({
  appear: {
    animation: 'groupWaveIn'
  }
});
chart.line().position('name*value').color('#FE5C5B').size(1).animate({
  appear: {
    animation: 'groupWaveIn'
  }
});
chart.point().position('name*value').color('#FE5C5B').animate({
  appear: {
    delay: 300
  }
});

/* chart.guide().html({
  position: ['50%', '50%'],
  html: '<view style="color: #FE5C5B;white-space: nowrap;text-align:center;">' + '<view style="font-size: 12px;margin:0;">诊断分</view>' + '<view style="font-size: 32px;margin:0;font-weight: bold;">73</view>' + '</view>'
}); */
  return chart;
},
jump(){
  my.navigateTo({
    url: '../day-k/day-k'
  });
},

});
json配置项:
{
"defaultTitle": "基金评估图",
"usingComponents": {
"f2": "@antv/my-f2"
}
}
my-f2版本2.1.5
@antv/f2版本3.8.3

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

No branches or pull requests

1 participant