How to read a vtk file and draw a line graph

Excuse me. I want to call the c++ interface of paraview to complete all the following operations:

Read a vtk file, plot the read data in the Line Chart View component, and specify the option of X Array Name as Points_X and the option of Series Paarameteres as Real in the properties interface.

How can I achieve it? Thank you very much!

What do you mean by that ? Do you want to create your own ParaView based application ? Do you want to use VTK to do that ?

I want to achieve the above operations by calling the corresponding methods on the ParaView based application that I have created.

Create the correct proxy and update it

plot the read data in the Line Chart View component,

Create the correct view and show the data in it

specify the option of X Array Name as Points_X and the option of Series Paarameteres as Real

Set the representation properties

Find examples here: https://gitlab.kitware.com/paraview/paraview/-/tree/master/Examples/CustomApplications?ref_type=heads

Thank you for your answer!

I made some attempts with examples. I loaded a vtk file in demo1. It could be directly displayed in the render view, but it could never be directly displayed in the line chart view. I hope to obtain the same line graph in the line chart view of demo1 as that in demo2. How can the vtk file be displayed directly in the line chart view of demo1 without any other operations? Does this implementation have any requirements for the vtk file?

I have placed the code of demo1 and the vtk file below.

You need to turn on the series you want to show using the right property.

Ok, thank you very much!