angular - 角度使图表中的选项可选选项
问题描述
我正在使用ngx-charts并且我有一个数据源,我想使用不同的图表类型来显示它,但是“autoScale”选项只能在少数图表中使用,但我想在可用时使用。
代码如下所示:
app.component.html
<ngx-charts-bubble-chart
[results]="results"
[xAxis]="options.xAxis"
[yAxis]="options.yAxis"
[legend]="options.legend"
[autoScale]="options.autoScale">
</ngx-charts-bubble-chart>
app.component.ts
obj = {
xAxis: true,
yAxis: true,
legend: false
autoScale: true
}
如何使 autoScale 可选,以便如果图表不支持 autoScale 我仍然可以使用相同的数据而无需手动删除该
[autoScale]="options.autoScale"
选项?
这可能吗?
解决方案
推荐阅读
- pytorch - 为什么 torch.nn.Upsample 返回垃圾图像?
- c++ - ARM GCC 默认链接器脚本 C++ 初始化问题
- email - 我正在尝试将 const data = 放入 ${body.email}。简单来说,就是在前面打字的时候发送邮件
- terraform - 正确定义 cyrilgdn/postgresql 提供程序的 Terraform 问题
- c++ - 将数据从 A 类中的对象传递到 B 类
- sql - 将电子商务商店中的产品图像作为单独的数据库实体实现是否需要很长时间来查询?
- vue.js - 子路径不适用于带有 aws 入口控制器入口的 vueapp
- java - 我如何通过回答是或否来重复这个程序?
- amazon-web-services - 为什么我无法通过代理连接到 RDS Aurora DB?
- python - 大熊猫中另一列的加权平均值