Ngx-charts: combo-chart error - Can't bind to 'xScale' since it isn't a known property of ':svg:g'

Created on 11 Jul 2017  路  11Comments  路  Source: swimlane/ngx-charts

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

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

importing combo-chart demo into my @angular/cli project
Expected behavior

browser console logs error:
_Can't bind to 'xScale' since it isn't a known property of ':svg:g'._

Reproduction of the problem

What is the motivation / use case for changing the behavior?

seems like something is missing in the setup instructions for @swimlane/ngx-charts

Please tell us about your environment:

OSX, ATOM, chrome Version 59.0.3071.115

  • ngx-charts version: x.x.x

    @swimlane/ngx-charts v 6.0.0
  • Angular version: 2.x.x

    @angular/cli 1.2.0
    @angular/core 4.0.0
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

    chrome, safari, firefox
  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    typescript 2.2.0, es5

Most helpful comment

I finally got it to work, after hours of playing with it. Eventually by copying one thing after another from the demo project until I was able to get rid of the errors. The difficulty, IMHO, arises from the complexity of the demo and, from a novice's perspective, not knowing what fields or components are fundamentally required by a particular component. I had a similar, follow on experience with the bubble-chart, where after several hours found the right combination of things to get it to display.

The whole purpose of my exercise was to display shapes (pointers, squares, circles) on top of a multi-line graph, where the shapes coincide with X-Axis coordinates. From what I've read, the best approach is to build my own ( similar to combo-chart ) and modify that accordingly, by combining the line-chart with the bubble-chart and modifying the bubble chart to display things besides circles...

I would like to turn this into a feature request of: 'having simple demos' of the individual components that spell out exactly what things are required for a particular component.

I love the demo, but my head hurts trying to extract the things I need. That being said, thx for the great work!

All 11 comments

How are you importing the component? Are you declaring it in your module?

I finally got it to work, after hours of playing with it. Eventually by copying one thing after another from the demo project until I was able to get rid of the errors. The difficulty, IMHO, arises from the complexity of the demo and, from a novice's perspective, not knowing what fields or components are fundamentally required by a particular component. I had a similar, follow on experience with the bubble-chart, where after several hours found the right combination of things to get it to display.

The whole purpose of my exercise was to display shapes (pointers, squares, circles) on top of a multi-line graph, where the shapes coincide with X-Axis coordinates. From what I've read, the best approach is to build my own ( similar to combo-chart ) and modify that accordingly, by combining the line-chart with the bubble-chart and modifying the bubble chart to display things besides circles...

I would like to turn this into a feature request of: 'having simple demos' of the individual components that spell out exactly what things are required for a particular component.

I love the demo, but my head hurts trying to extract the things I need. That being said, thx for the great work!

Great! Yeah, we need more documentation on the individual components along with examples. Pull requests in that direction are welcome.

I'm going to close this one because the original issue has been resolved.

@grimace What did you have to do to get this working? I'm running into the same error.

@grimace Can you please provider the example, I want line and bubble combined chart.

Since at least 4 of us have run into this, I thought I'd post the solution. When you are creating the components in your own project, make sure you create both: ComboChartComponent and ComboSeriesVerticalComponent. I wrongly assumed the ComboSeriesVerticalComponent was something I didn't need (thinking it was just a different version of the same thing).

@marjan-georgiev @grimace
I need a combo chart between Stacked Bar Char and Line Bar Chart could you help me with some example.
Thanks.

@frankdavidcorona Did you have any luck with that combo chart. I need exactly the same.
Let me know if you get a good example

@grimace can you share with us what did cause the problem?

Thank you!

Angular IVY results in same error.

The Ivy issue should be resolved in v 13.0.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amcdnl picture amcdnl  路  4Comments

Hypercubed picture Hypercubed  路  3Comments

lokeshdaiya picture lokeshdaiya  路  3Comments

NashIlli picture NashIlli  路  3Comments

merinshaji picture merinshaji  路  3Comments