Hello,

I am working on an application that displays several series on the same
chart. The series display similar data so they actualy share vertical and
horizontal axes.

I noticed that series.describeData method is invoked twice for each
dimension on any underlying data update. It turnes out that the axes are
involved in several equal DataTransform objects within the chart.
One common created in the CartesianChart, and one for each Serie object.
Each data update leads to describeData invocation in the axes, they in turn
call describeData on the registered datatransforms, the datatransforms call
describeData on each IChartElement.

Thus, each serie is contained in two dataTransforms: CartesianCharts' one
and the Serie's own one.

DataTransform object does not contain any state, so I wanted to reuse the
chart's datatransform for all the series. Each Serie implements
IChartElement so it implies passing in an external DataTransform.

But, it turns out that the implementation of each series (Line, HLOC, Area)
contains the following code in commitProperties method:

dataTransform.elements = [this];

Moreover, the implementation of CartesianDataCanvas contains the code as
well.

Is there any reason why I should not want to reuse the same DataTransform or
it is a bug?

P.S.
As a hack, I certainly can override the commitProperties and return the
thrown out elements back, or even set elements array to an empty one and
communicate over the CartesianChart's datatransform. I just wonder why it is
as it is.

I am using Flex 3.3.0.

Reply via email to