Cannot get spanGaps to work

UI Components for Angular
Post Reply
bmj@danhatch.dk
Posts: 5
Joined: 28 Dec 2016, 09:13

24 Apr 2017, 08:50

Hi all

According to the ChartJs documentation for line charts you should be able to set spanGaps=true thus connecting datapoints though you have gaps in your dataseries (http://www.chartjs.org/docs/#line-chart)

Should this work for PrimeNg line charts as well? Because I cannot make it work.

Below is my dataset.

Code: Select all

{"labels":[135,200,250,258,259,260,300],"label":"Mortality Ross 508","data":[50.00000,55.00000,60.00000,null,null,null,55.00000],"fill":false,"borderColor":"#41f480","borderDash":["15","5"],"backgroundColor":"#41f480","yAxisID":"2","lineTension":0.00000,"borderWidth":1.00000,"spanGaps":true,"pointRadius":7.0,"pointStyle":"circle","pointHoverRadius":8.0,"pointBorderWidth":2,"pointHoverBorderWidth":2}
Best regards

Bent

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

24 Apr 2017, 12:57

There is a bug in chartjs library in older versions.

https://github.com/chartjs/Chart.js/issues/2812

Can you try latest versions of chartjs and let us know.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

bmj@danhatch.dk
Posts: 5
Joined: 28 Dec 2016, 09:13

24 Apr 2017, 13:19

Hi

Thank you for your reply.

I am not sure I know how to do that??

I don't have chart.js installed. I thought it was somehow a part of the primeng package.

Bent

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

25 Apr 2017, 06:22

That is a third party library.You might be referring through CDN or local reference.Just upgrade it to newer version.Do workspace search :)
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests