color: String

Sets the color of dataPoint. It overrides the color set at dataSeries level or the one chosen from theme. Value of color can be “HTML Color Name” or “hex” code.

Default: From Theme
Example: “red”, “green”..
Notes
  • Default colors are chosen from theme.
  • var  chart =  new  CanvasJS.Chart("container",
    {
     .
     .
      data:[ {
       dataPoints: [
        {x: 10 , y: 50 , color: "Indigo" },
    
      ],
    
     },
     ]
     .
     .
    });
    chart.render();
    

    Try Editing The Code


    If you have any questions, please feel free to ask in our forums.Ask Question