angularjs - Can a chart-line show a legend like chart-radar (for instance)?
问题描述
I have the angularjs chartline:
<canvas id="line" class="chart chart-line" chart-data="data" chart-series="series" chart-labels="labels" chart-options="options" chart-legend="true">
</canvas>
I want it to show legend (series) on the top of chart like how it works at chart-radar.
I have all settings for this, but it doesn't work properly:
$scope.options = { legend: { display: true } };
How to do it?
解决方案
It was necessary to add to the options namespace. Like this:
$scope.options = {
legend: {display: true}
};
推荐阅读
- python - 在 pandas DataFrame 中对相同的连续值进行分组
- postgresql - 流式复制因“WAL 段已被移动”而失败
- ios - Swift - 在 segue 之后保存 ViewController 设置
- android - 如何在回收站视图中打开 Stflacon 库中的图像?
- python - pytest:如何仅对特定的测试代码行禁用标准输出捕获
- ionic-framework - 我可以在 Windows 操作系统中使用 Ionic 创建 APK 和 IPA 文件吗?
- javascript - AJAX POST 问题,变量为空,但在 echo 中显示
- audio - 如何使用 FFMpeg 将 outro 背景音乐添加到另一个音频文件?
- typescript - 使用预设键键入 TypeScript 界面键
- ms-word - 有没有办法在docusign word插件中保持登录状态?