angular-charts icon indicating copy to clipboard operation
angular-charts copied to clipboard

Angular-charts incompatible with datejs

Open kmikzjh opened this issue 10 years ago • 4 comments

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??

kmikzjh avatar Sep 17 '14 13:09 kmikzjh

I tested with the examples page and the issue did not occur. Are you using the latest version of angular-charts?

angularchartsdatejs

chaosfinity avatar Sep 17 '14 16:09 chaosfinity

This would be an issue in preparing your data. Try logging it before passing to angular-charts

chinmaymk avatar Sep 18 '14 09:09 chinmaymk

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

JerabekJakub avatar Oct 22 '14 06:10 JerabekJakub

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()

chaosfinity avatar Oct 22 '14 14:10 chaosfinity