Ng2-charts: The radius provided (-0.5) is negative.

Created on 26 Jan 2016  路  5Comments  路  Source: valor-software/ng2-charts

Hi. i have this error when I try to show any chart.

EXCEPTION: IndexSizeError: Failed to execute 'arc' on 'CanvasRenderingContext2D': The radius provided (-0.5) is negative.

I tried to delay chart generation until outer 'div' has shown but nothing.

It's a known bug?

Thanks.

Most helpful comment

@valorkin not charts.js error. only add style
.chart {
display: block;
width: 100%;
} can solve it.canves need initialization銆侷 think you should write it in readme.md.Because many people will find this problem,it is a pit.Thank you.

All 5 comments

@mrpotato3 sounds like charts.js error
not an ng2 like error for sure
try to report it to https://github.com/nnnick/Chart.js

@valorkin not charts.js error. only add style
.chart {
display: block;
width: 100%;
} can solve it.canves need initialization銆侷 think you should write it in readme.md.Because many people will find this problem,it is a pit.Thank you.

Please include the styles (for .chart) mentiond by @SallyOne in the readme.md
It sure took me a long time to figure that one out.

please check with latest version

Closing for inactivity - if issue persists, feel free to comment.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sarn3792 picture sarn3792  路  4Comments

shenriksen4 picture shenriksen4  路  3Comments

RKornu picture RKornu  路  3Comments

edarev picture edarev  路  5Comments

raychenfj picture raychenfj  路  3Comments