# Information\_only properties don't work for custom representation

**URL:** https://discourse.paraview.org/t/information-only-properties-dont-work-for-custom-representation/16097
**Category:** Development
**Created:** [February 3, 2025, 8:25am UTC](https://discourse.paraview.org/t/information-only-properties-dont-work-for-custom-representation/16097 "2025-02-03T08:25:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jeDuck](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@jeDuck](https://discourse.paraview.org/u/jeDuck)
#### Post date: [February 3, 2025, 8:25am UTC](https://discourse.paraview.org/t/information-only-properties-dont-work-for-custom-representation/16097/1 "2025-02-03T08:25:32Z")

</div>

Dear Paraview developers,  
I have a custom representation, which is a subclass of vtkXYChartRepresentation. It has a property and I want to manipulate its visibility depending on the input. I have created an information\_only property to manage that. The xml configuration looks something like that:

```auto
<ChartRepresentationProxy base_proxygroup="representations"
						  base_proxyname="XYChartRepresentation"
						  class="vtkXYMyChartRepresentation"
                          name="XYMyChartRepresentation"
                          processes="client|dataserver|renderserver"
                          post_creation="SetChartTypeToLine">		

	<IntVectorProperty name="VisualizationType"
                       command="GetVisualizationType"
                       information_only="1"/>

	<DoubleVectorProperty command="SetMyProperty"
							default_values="0"
							name="MyProperty"
							number_of_elements="1">
		<DoubleRangeDomain max="1"
						   min="0"
						   name="range" />
	</DoubleVectorProperty>
	
</ChartRepresentationProxy> 

```

Then I manipulate the VisualizationType in RequestData

```auto
int vtkXYMyChartRepresentation::RequestData(
  vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
{
  if (!this->Superclass::RequestData(request, inputVector, outputVector))
    return 0;
 
  VisualizationType = 1;
  this->PlotDataHasChanged = true;
  return 1;
}

```

However, the visibility of MyProperty doesn’t change depending on what value I set in RequestData, it is visible if I contruct it like VisualizationType{1} and invisible if VisualizationType{0}. The function GetVisualizationType() doesn’t seem to get called at all. What am I doing wrong and what are the ways to implement that kind of behaviour?

---

<div class="post-metadata">

### Author: ![dcthomp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dcthomp/32/20_2.png) [@dcthomp](https://discourse.paraview.org/u/dcthomp)
#### Post date: [February 3, 2025, 3:46pm UTC](https://discourse.paraview.org/t/information-only-properties-dont-work-for-custom-representation/16097/2 "2025-02-03T15:46:29Z")

</div>

1. You are changing the value of the `VisualizationType` ivar without marking the filter as modified; thus the ParaView client/server framework does not know it has changed on the server.
2. You should not always mark a filter as modified in `RequestData()` since that will require the filter to re-execute immediately (i.e., it will never terminate).

There may be other issues, but those jumped out at me.
