Open burzum619 opened 6 years ago
Taking a further look at the source code for the grouped bar chart , it looks like the <svg:g>
elements inside of the inline template are what's actually being rendered - and my custom svg elements (including my line chart) are being ignored. Is there any way to get around this behavior?
@burzum619, have you had any luck with resolving your issue? I'm having a similar problem with creating a stacked bar/line combo chart.
@PavelYaroshchyk No, unfortunately I have not had any luck with this.
@burzum619 have you had any luck with resolving your issue? I'm having a similar problem with creating a grouped vertical bar/line combo chart.
Hello,
I am attempting to create a custom chart that combines a grouped vertical bar chart with a line chart overlayed on top of it. I've been using the following demo example of a custom "combo chart" as a starting point:
https://github.com/swimlane/ngx-charts/blob/master/demo/combo-chart https://swimlane.github.io/ngx-charts/#/ngx-charts/combo-chart
In practice, I already have the grouped bar chart working correctly. However, I'm having trouble adding the line chart on top of it.
In my
combo-chart.component.ts
, I have updated my inline template to use anngx-charts-bar-vertical-2d
instead of thengx-charts-chart
that the demo linked above uses. Unfortunately, it looks like the inner-SVG elements do not appear to be respected.When looking at the markup that is actually rendered, I do not see the
line-chart
<g>
element anywhere - only thebar-chart
. I also attempted to remove the<svg:g [attr.transform]="transform" class="bar-chart chart">
svg group from my template, just to see what would happen. thengx-charts-bar-vertical-2d
component still renders the bar-chart. It seems all the svg elements inside of thengx-charts-bar-vertical-2d
are being ignored.I do not see any js/ts errors or warnings present. I briefly attempted to replace the
ngx-charts-bar-vertical-2d
with angx-charts-chart
, and that seemed to render theline-chart
and inner-elements (although my chart was broken due to the data not being in the right format for a normal bar chart). Is creating a custom grouped vertical chart simply not an option with the ngx-charts framework? Thanks in advanced for your help.