angular-charts
angular-charts copied to clipboard
Angular-charts incompatible with datejs
A few days ago, I implemented a pie chart with angular-charts, then I added datejs for a report and the chart stopped working (svg without values -path tag-), but when I removed datejs, the chart worked again.
Without datejs
<svg width="300" height="176">
<g transform="translate(150,88)">
<g>
<path class="arc" d="M0,-78A78,78 0 0,1 0,-78L0,0Z" style="fill: rgb(255, 133, 27);"></path>
</g>
<g>
<path class="arc" d="M0,-78A78,78 0 0,1 0,-78L0,0Z" style="fill: rgb(40, 182, 44);"></path>
</g>
<g>
<path class="arc" d="M0,78A78,78 0 1,1 0,-78A78,78 0 1,1 0,78Z" style="fill: rgb(117, 202, 235);"></path>
</g>
</g>
</svg>
With datejs
<svg width="300" height="176">
<g transform="translate(150,88)">
<g>
<path style="fill: rgb(255, 133, 27);"></path>
</g>
<g>
<path style="fill: rgb(40, 182, 44);"></path>
</g>
<g>
<path style="fill: rgb(117, 202, 235);"></path>
</g>
</g>
</svg>
Any idea??
I tested with the examples page and the issue did not occur. Are you using the latest version of angular-charts?
This would be an issue in preparing your data. Try logging it before passing to angular-charts
I have the same issue. I have latest version of angular-charts. When I remove datejs.js it works. Look at your basic example with added (not used) datejs.js import: http://plnkr.co/edit/QFlB1DsWxwwgiboiNjSR?p=preview
This is a conflict with datejs and d3. There is a issue over on the d3 project https://github.com/mbostock/d3/issues/1302 with a link to a trunk version of datejs that does not replace Date.now()