Hi,
I need to know if a user has hidden one o more dataset. ChartJS.Dataset(x).Hidden property return always False
is there a way to get this information?
best
Cristian
Hi Levie,
try with barchart with your example: https://docs.wisej.com/examples/examples/chartjs
I’m not eable to know if the dataset is hidden or not
best
Cristian
Hi Cristian,
can you please wrap up a small test case so we can see why it fails for you?
Thanks in advance!
Best regards
Frank
I have try this.chart.data.datasets[0].hidden
don’t return error, but return always false
Sorry Levie, I have an error: : ‘this.widget is undefined’
You can check the hidden status of the client-side widget’s dataset using this:
var isHidden = await this.chartJS1.EvalAsync("this.widget.data.datasets[0].hidden"); AlertBox.Show($"Hidden Status from Client: {isHidden}");
HTH,
Levie
Hi Levie,
sorry for my late reply, the notification email don’t arrives.
your code works, but I need to know it the user has hidden the dataset client side
best
Hi Cristian,
I just tried with this and it seems to work correctly. Can you attach a small sample?
private void button1_Click(object sender, EventArgs e) { this.chartJS2.DataSets[0].Hidden = !this.chartJS2.DataSets[0].Hidden; AlertBox.Show(this.chartJS2.DataSets[0].Hidden.ToString()); this.chartJS2.Update(); }
Thanks!
Levie
Please login first to submit.