c3 icon indicating copy to clipboard operation
c3 copied to clipboard

Adjust Scatterplot Circle Radius

Open sandrolino opened this issue 12 years ago • 5 comments

Hi, I have a rather large data set I want to plot in a scatter graph. How can i set the radius/diameter of the data points to prevent overlap.

Thanks s

sandrolino avatar Apr 15 '14 07:04 sandrolino

Hi @sandrolino , I think point.r option to change the radius of each point. Could you try this option?

If the radius needs be change for each point, this option needs to be extend to accept function to change the radius according to the data.

masayuki0812 avatar Apr 17 '14 06:04 masayuki0812

Thanks a lot, worked out for me (just needed to adjust the radius uniform, not dependent on data ). Great work btw !!

sandrolino avatar Apr 17 '14 08:04 sandrolino

OK :+1:

masayuki0812 avatar Apr 21 '14 10:04 masayuki0812

How do you use point.r option? I couldn't find any documentation on options for the charts. Can you post a sample of code? Great library btw. I appreciate your work on it.

mbokil avatar Apr 27 '14 19:04 mbokil

mbokli, sorry for the late reply. here an example

  var chart = c3.generate({
    bindto: '#chart',

    data: {
        x: 't',

          columns: [
            DayVec,
            y

            ],



      },


      axis: { 
          x: {label: 'Day of Year',tick: {count: 5} },
          y: { label: 'Temperature °C'}
          },
     point: {r:.1}



  });

sandrolino avatar May 05 '14 20:05 sandrolino