Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I add new axes, text objects, plot objects, and images to a chart after it is already displayed; or must I create a new chart from scratch taking into account the additional objects?

0
Posted

Can I add new axes, text objects, plot objects, and images to a chart after it is already displayed; or must I create a new chart from scratch taking into account the additional objects?

0

There are two ways to add new objects to a chart. The first way is to create all objects when the chart is initially created, but disable the ones that you do not want to show up when the chart is initially rendered. Enable the objects when you want them to show up. Use the chart objects setChartObjEnable method to enable/disable the object. This is useful if you are creating an animated chart where you want the chart to sequence through a predefined series of steps. The second way you add new chart objects to the ChartView using the ChartView.addChartObject method. In both cases you need to call the ChartView.updateDraw() method after any changes are made. The example below, extracted from the datacursorsandmarkers.DataCursorChart2.CustomChartDataCursor class, creates a new Marker object and NumericLabel object each time a mouse button clicked. // create marker object at place it at the nearest point Marker amarker = new Marker(getChartObjScale(), MARKER_BOX, nearestPoint.getX(), near

0

There are two ways to add new objects to a chart. The first way is to create all objects when the chart is initially created, but disable the ones that you do not want to show up when the chart is initially rendered. Enable the objects when you want them to show up. Use the chart objects SetChartObjEnable method to enable/disable the object. This is useful if you are creating an animated chart where you want the chart to sequence through a predefined series of steps. The second way you add new chart objects to the ChartView using the ChartView.AddChartObject method. In both cases you need to call the ChartView.UpdateDraw() method after any changes are made. The example below, extracted from the the CustomChartDataCursor class, creates a new Marker object and NumericLabel object each time a mouse button clicked.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123