Jump to content
Software FX Community

Scaling according to units


User (Legacy)

Recommended Posts

I want to add a feature, that when the user selects the desired units for X

and Y asix, the displayed chart should be changed according to the selected

units for the corresponding units using Chartfx I am also adding annotations

on the chart by specifying the points to be placed. Some annotations can be

added from the toolbars too. The user can also view the specified area by

specifying the points and i view the are by changing the axis's min and max

properties e.g, .axisX.min and .axisX.max

Two methods came into my mind for this process:

1. Redraw the whole chart and feed all the data with the unit factor

adjusted. This way I have to calculate all the annotations added by the

user. For the annotations added from the toolbar, I can save the references

of the annotations in some datastructure from the ObjectCreated event of the

annotation. I will recalculate the toolbar added annotations.

2. Donot adjust all the data. Since the chart displayed depends on the

min and max values of the points on Y and X axis and shape of the chart

doesnt change by changing the scale. The only visible feature is the labels.

So I will add the labels with the unit factors. When the units are changed,

I will just recalculate the labels. This way the annotations will be drawn

at the same place.

Is there any builtin feature to use for the scaling in the Chartfx ?

Regards,

Ahmad Luqman

Link to comment
Share on other sites

You can attach annotation object to logical X/Y Axis units by using the 

Attach method. Attached object will move and/or resize as the scale changes.

I'm not sure if this is what you are looking for, if it is not, please

provide with a screenshot that illustrates the use you are giving to these

annotation objects and how do you want them to transition when the scale is

changed.

--

Francisco Padron

www.chartfx.com

"Ahmad Luqman" <ahmad.luqman@trivor.com> wrote in message

news:lK8M5sDlFHA.2860@webserver3.softwarefx.com...

>

> I want to add a feature, that when the user selects the desired units for

> X

> and Y asix, the displayed chart should be changed according to the

> selected

> units for the corresponding units using Chartfx I am also adding

> annotations

> on the chart by specifying the points to be placed. Some annotations can

> be

> added from the toolbars too. The user can also view the specified area by

> specifying the points and i view the are by changing the axis's min and

> max

> properties e.g, .axisX.min and .axisX.max

>

> Two methods came into my mind for this process:

>

> 1. Redraw the whole chart and feed all the data with the unit factor

> adjusted. This way I have to calculate all the annotations added by the

> user. For the annotations added from the toolbar, I can save the

> references

> of the annotations in some datastructure from the ObjectCreated event of

> the

> annotation. I will recalculate the toolbar added annotations.

>

> 2. Donot adjust all the data. Since the chart displayed depends on the

> min and max values of the points on Y and X axis and shape of the chart

> doesnt change by changing the scale. The only visible feature is the

> labels.

> So I will add the labels with the unit factors. When the units are

> changed,

> I will just recalculate the labels. This way the annotations will be drawn

> at the same place.

>

> Is there any builtin feature to use for the scaling in the Chartfx ?

>

> Regards,

>

> Ahmad Luqman

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...