ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  XYChart in VB.NET
Posted by Chuck on Jun-30-2021 07:08

Dim z As XYChart = New XYChart
z = GetChart()  â€˜this is my function that returns the current XYChart

Question: How do I reference the ViewPort (winChartViewer1) from z?

Thank you,
Chuck

  Re: XYChart in VB.NET
Posted by Peter Kwan on Jun-30-2021 13:30
Hi Chuck,

You cannot reference the ViewPort (winChartViewer1) from the XYChart. You can only reference the XYChart from the winChartViewer1 (by using the winChartViewer1.Chart property) The XYChart is the input to the winChartViewer1. You can consider the winChartViewer1 to be a container of the XYChart, analogous to an ArrayList being a container for other elements. You can access the elements from the container, but not the reverse.

If you want to display the chart, at some point your code will need to assign the chart to the winChartViewer1 for display. That means your code already have the reference to the winChartViewer1 and hence the viewport.

Regards
Peter Kwan

  Re: XYChart in VB.NET
Posted by Chuck on Jun-30-2021 19:07

Thank you, this is helpful.
Chuck