swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.3k stars 1.15k forks source link

Combo chart demo referencing 'clipPath' #911

Open avoerman opened 6 years ago

avoerman commented 6 years ago

I'm submitting a ... (check one with "x")

Current behavior Bug in the documentation / demo.

AOT build fails with " : Property 'clipPath' does not exist on type 'ComboLineChartComponent'." when using the combo-chart component.

Expected behavior clipPath should reference something.

Reproduction of the problem I'm trying to get a custom combo chart example running. I copied the combo-chart-component (https://github.com/swimlane/ngx-charts/blob/master/demo/combo-chart/combo-chart.component.ts) and have been running into aot compile issues. One clear bug is that attr.clip-path seems to be set to "clipPath" which doesn't exist.

  <svg:g [attr.clip-path]="clipPath">

I'm not sure why the line chart would have a clip path? Can this be removed? If so, I can make a PR to remove it, but if it was intended to support one of the user configs, it may be something never implemented.

What is the motivation / use case for changing the behavior? Copying code from documentation. Documentation on the combo charts is confusing.

Please tell us about your environment: using angular-cli, ng serve --aot

Buggyy commented 6 years ago

+1

pedrosanguineti commented 5 years ago

Have you guys found a work around?, I cannot get the combo-chart example to work.

avoerman commented 5 years ago

Have you guys found a work around?, I cannot get the combo-chart example to work.

We ended up ditching ngx-charts and calling d3 directly. Not having a component for multiple y-axis charts was a deal breaker. It's not too terrible to create your own - I used https://bl.ocks.org/uredkar/71c3a0d93cc05527c83cdc12f9549ab3 as an example and added needed features (like axises, tootlips, animation) from there.