Disable the Label of the chartJS

0
1

I need to disable the Label, how i do that?

Example:

private void Page1_Load(object sender, EventArgs e)
{
this.chartJS1.DataSets.Add(new BarDataSet
{
Label = “Bar Dataset”, // Disable this budy
BackgroundColor = new[] { Color.FromArgb(100, Color.Red) },
Data = new object[] { 10, 20, 30, 40 }
});

this.chartJS1.DataSets.Add(new LineDataSet
{
Label = “Line Dataset”, // disable this budy
BackgroundColor = Color.FromArgb(100, Color.Blue),
Data = new object[] { 30, 40, 45, 48 },
});

this.chartJS1.Labels = new[] { “January”, “February”, “March”, “April;” };
}

  • You must to post comments
0
0

Hi Jay,

You can disable the labels by setting the Options.Legend.Display property to false.

HTH,
Alaa

  • Jay Marl
    Thanks bro.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.