3

Chart.js is amazing, but I'm using angularjs chart.js directive. I can turn off all dots on all lines with the below code where vm.options is set to the chart-options attribute:

vm.options = {
            elements: {
                point: {
                    radius: 0
                }
            }
        };

However, I'd only like to hide the dots on 2 of the 3 datasets I have and I'm not sure how to get that for angularjs chart.js. My dataset's is just an array of arrays of data (not an object), and when I look at chart.js and how they hide dots they do it on a dataset object, but that doesn't match how I'm doing my datasets so I'm confused.

Wim Ombelets
  • 5,097
  • 3
  • 39
  • 55
user441521
  • 6,942
  • 23
  • 88
  • 160

1 Answers1

1

you can use pointRadius: 0 in your $scope.datasetOverride to turn off dots for each dataset

$scope.datasetOverride = [{    
    label: "No Dots Line",
    fill: true,
    pointRadius: 0,
  }];

https://codepen.io/vfx/pen/dLpEgW

Synxmax
  • 2,226
  • 1
  • 22
  • 38
  • You nailed it man! Thank you so much. Being new to chart.js its confusing for me to describe what I want as shown by some of the comments on my post but you nailed it! – user441521 Apr 09 '19 at 19:57