Hi Boris,
The
ViewPortWidth is the actual width which is used by the chart to paint the data points.It depends on the real size of the chart and it will remain constant even if you zoom or pan the control. The zoom and pan affect the
PlotOriginX and
PlotOriginY properties of the view and depending on their values the view port is translated to the left, top, bottom or right. Nevertheless, the width would remain constant unless you resize the control or for example remove the margin of the view element:
Regarding your actual setup please also consider adding the layout slot which is occupied vertical axis. Its location and size will also need to be considered when checking for a particular data point if it is visible. The width of the axis is very small, by default, it is only 21 px so until now you have missed some border cases of having data points very close to the axis but outside of the calculated viewport. You can try changing your method this way:
In case you need further assistance please set up a sample project according to your local setup and send it over.
I hope this helps. Should you have further questions please do not hesitate to write back.
Regards,
Hristo
Progress Telerik