自定义图表¶
比可用图表,NGX-图表库等还出口都用作添砖加瓦图表组件和佣工。 就像传说,轴,尺寸帮手,渐变,形状的东西,一系列的形状,都可以直接导入到你的应用程序和您的组件使用。这可以让你把它们混合起来并实现用例是,预先制作图表不支持创建自定义的图表。
你可以找到如何使用这些组件在这里建立一个自定义图表示例: https://github.com/swimlane/ngx-charts/tree/master/demo/combo-chart
上述组合,图表的演示可以在这里看到: https://swimlane.github.io/ngx-charts/#/ngx-charts/combo-chart
The charts under the ‘Demos’ group in our demo page are not distributed with the library. However, their code is available and can be copied directly into your project. We encourage you to submit a pull request for your custom charts to be listed in our ‘Demos’ section, because they may help other people that have the same use case as you.
指针创建或调整时,自定义图表¶
为了开发新的图表,首先建立示范项目的shell启动。
If you start by copying an existing chart from src (recommended), be sure to rename your new component(s) and their selectors, as well as the module that contains them (if applicable).
If you discover the tooltip does not display correctly, try exporting the new chart as a module along with ChartCommonModule and import it into the demo’s app.module.ts file.
对于这样的一个例子,看看大多数任何排行榜中的src文件夹
Always a good idea to give back. Use this link to learn how to contribute to github repos: http://kbroman.org/github_tutorial/pages/fork.html