function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Marco_ValenteMarco_Valente 

Chart JS - PointStyle Not work with lockerService enable

i use the Version: 2.6.0 chart js. I have set the pointStyle with an image:
var icon = new Image();
icon.src = 'https://assets0.uvcdn.com/pkg/shared/favicons/password-d904f06a67a7b29d489489d3a35f548b.png';

and into dataset object set "pointStyle: icon".

This is not work in lightning with lockerService enable. Exist an workaround? another is found this problem?
Fazurulla GagangapalliFazurulla Gagangapalli
Hi Marco,

For me it is working fine(Enabled locker service)...take a look at this 

http://sfdc999.blogspot.in/2018/04/standard-report-charts-in-lightning.html
Marco_ValenteMarco_Valente
Hi,
yes this library work in locker service and build well dashboard.
But if you want change style point line, set an icon:
                    var icon;
                    if (component.get('v.IconaSorgente') != undefined) {
                        icon = new Image();
                        icon.src = $A.get('$Resource.' + component.get('v.IconaSorgente'));
                    } else {
                        icon = 'circle';
                    }

and into dataset point style attribute not work in locker service

singleData = {
                            scaleOverride: true,
                            label: 'Sinistro',
                            data: data2,
                            borderColor: component.get('v.ColoreLineaSinistro'),
                            borderDash: borderDashS,
                            fill: false,
                            pointBackgroundColor: component.get('v.ColoreLineaSinistro'),
                            pointBorderWidth: 2,
                            pointHoverRadius: 2,
                            pointRadius: 2,
                            bezierCurve: true,
                            pointStyle: icon,
                            pointHitRadius: 2,
                            borderWidth: component.get('v.LarghezzaLinea_PX_Sinistro')
                        };

This is a big limitation. You have found this problem?

Thanks.
Regards