@ristola said in Hiding Dashboard Elements if DataPoints are Disabled.:
Sorry, perhaps I am not describing my intention clearly.
Using a ma-gauge-chart.
When disabling the datasource this is what I get.
Instead of the red cross hatch, I am trying to make the gauge not show at all.
In the dashboard designer under the properties, Under the Advanced CSS's display property, I can manually set to "none" and it hides it but not sure how to set it with the point.enabled flag.
The Angular JS, the ng-hide / show causes the red cross hatch.

When disabling the datasource this is what I get.
That's what's wrong and why you see this like that. Disabling datasources and disabling datapoints are different methods so seeing this is actually intended. If you want it also to remove based on datasource state then do a datasource query like this
<!-- Get our point based on xid -->
<ma-get-point-value point-xid="dp_2323fsadilj" point="point"></ma-get-point-value>
<!-- Get our datasource based on point datasource xid -->
<ma-data-source-query data-sources="dataSourcesArray" query="{xid: point.dataSourceXid}" limit="10"></ma-data-source-query>
<!-- Hide element when datasource is not enabled or point is not enabled -->
<div ng-hide="!dataSourcesArray[0].enabled || !point.enabled">
<span ng-bind="point.value"></span>
</div>