Jump to content
Software FX Community

Decimal precision on chart points


User (Legacy)

Recommended Posts

In ChartFX IE version 3.5, there is a property called DecimalsNum that

enables you to specify the number of decimals to display on each of the

axes and also for the Point Values (Balloon, Dialog and Data-Editor).

In the new version of ChartFX, there are properties on the AXIS object

that enable you to set the decimal precision for the axes, but I can't

find where I can set the decimal precision for point values (I want more

precision on the point values than I do on the axes).

Am I missing where I can do this in the new version? Help!

--

Stuart Thompson

Link to comment
Share on other sites

ChartFX uses the same precision for point values as for the axis "used" by

the point (if a point is tied to the secondary axis its point values will

show the number of decimals of the secondary axis).

If you are not using the secondary axis, you could set your series to use

the secondary axis (before passing the data) like this

' Pass your data

chart.OpenDataEx COD_VALUES,1,2

chart.ValueEx(0,0) = 20

chart.ValueEx(0,1) = 22

chart.CloseData COD_VALUES

chart.PointLabels = true

chart.Series(0).YAxis = AXIS_Y2

' Copy the settings from the Y axis to use the min-max calculated by ChartFX

chart.Axis(AXIS_Y2).Min = chart.Axis(AXIS_Y).Min

chart.Axis(AXIS_Y2).Max = chart.Axis(AXIS_Y).Max

' Hide this axis and set the number of decimals

chart.Axis(AXIS_Y2).Visible = false

chart.Axis(AXIS_Y2).Decimals = 4

--

Regards

JC

Software FX Support

"Stuart Thompson" <stuart_thompson@transcanada.com> wrote in message

news:3C768853.8B3A6BF9@transcanada.com...

> In ChartFX IE version 3.5, there is a property called DecimalsNum that

> enables you to specify the number of decimals to display on each of the

> axes and also for the Point Values (Balloon, Dialog and Data-Editor).

>

> In the new version of ChartFX, there are properties on the AXIS object

> that enable you to set the decimal precision for the axes, but I can't

> find where I can set the decimal precision for point values (I want more

> precision on the point values than I do on the axes).

>

> Am I missing where I can do this in the new version? Help!

>

> --

> Stuart Thompson

>

>

>

Link to comment
Share on other sites

That would work except that I am plotting an X/Y (scatter) graph

I would like both axes to show no decimal points on the axes label (as I have

set the starting, ending and step values for the axes in such a way that they

only use whole numbers)... but I want the data editor and the point values to

show the full precision of both X and Y values (in this case, 3 decimal

places). Any suggestions?

Worst case, I will switch the axes to use 3 decimal places, but it seems a shame

to extend the size of the axes labels by an additional 3 digits... it makes the

graph look untidy and will seem unnecessary to the user since the digits behind

the decimal point will always be 0 on the axes.

Software FX Support wrote:

> ChartFX uses the same precision for point values as for the axis "used" by

> the point (if a point is tied to the secondary axis its point values will

> show the number of decimals of the secondary axis).

>

> If you are not using the secondary axis, you could set your series to use

> the secondary axis (before passing the data) like this

>

> ' Pass your data

> chart.OpenDataEx COD_VALUES,1,2

> chart.ValueEx(0,0) = 20

> chart.ValueEx(0,1) = 22

> chart.CloseData COD_VALUES

>

> chart.PointLabels = true

> chart.Series(0).YAxis = AXIS_Y2

>

> ' Copy the settings from the Y axis to use the min-max calculated by ChartFX

> chart.Axis(AXIS_Y2).Min = chart.Axis(AXIS_Y).Min

> chart.Axis(AXIS_Y2).Max = chart.Axis(AXIS_Y).Max

>

> ' Hide this axis and set the number of decimals

> chart.Axis(AXIS_Y2).Visible = false

> chart.Axis(AXIS_Y2).Decimals = 4

>

> --

> Regards

>

> JC

> Software FX Support

>

> "Stuart Thompson" <stuart_thompson@transcanada.com> wrote in message

> news:3C768853.8B3A6BF9@transcanada.com...

> > In ChartFX IE version 3.5, there is a property called DecimalsNum that

> > enables you to specify the number of decimals to display on each of the

> > axes and also for the Point Values (Balloon, Dialog and Data-Editor).

> >

> > In the new version of ChartFX, there are properties on the AXIS object

> > that enable you to set the decimal precision for the axes, but I can't

> > find where I can set the decimal precision for point values (I want more

> > precision on the point values than I do on the axes).

> >

> > Am I missing where I can do this in the new version? Help!

> >

> > --

> > Stuart Thompson

> >

> >

> >

--

Stuart Thompson

Link to comment
Share on other sites

If your data has a well known range you may want to try setting the labels

manually for both the X and Y axes. You will have to assign labels such as

"1" "2" "3" , etc. and make the LabelValue property of the axis the same as

your step.

We have added support for two formats (a separate LabelsFormat and

DataFormat including number of decimals and custom formatting) to our next

version of ChartFX now in beta. Thank you for your feedback.

--

Regards

JC

Software FX Support

"Stuart Thompson" <stuart_thompson@transcanada.com> wrote in message

news:3C76C7A4.D4D0D510@transcanada.com...

> That would work except that I am plotting an X/Y (scatter) graph

>

> I would like both axes to show no decimal points on the axes label (as I

have

> set the starting, ending and step values for the axes in such a way that

they

> only use whole numbers)... but I want the data editor and the point

values to

> show the full precision of both X and Y values (in this case, 3 decimal

> places). Any suggestions?

>

> Worst case, I will switch the axes to use 3 decimal places, but it seems a

shame

> to extend the size of the axes labels by an additional 3 digits... it

makes the

> graph look untidy and will seem unnecessary to the user since the digits

behind

> the decimal point will always be 0 on the axes.

>

> Software FX Support wrote:

>

> > ChartFX uses the same precision for point values as for the axis "used"

by

> > the point (if a point is tied to the secondary axis its point values

will

> > show the number of decimals of the secondary axis).

> >

> > If you are not using the secondary axis, you could set your series to

use

> > the secondary axis (before passing the data) like this

> >

> > ' Pass your data

> > chart.OpenDataEx COD_VALUES,1,2

> > chart.ValueEx(0,0) = 20

> > chart.ValueEx(0,1) = 22

> > chart.CloseData COD_VALUES

> >

> > chart.PointLabels = true

> > chart.Series(0).YAxis = AXIS_Y2

> >

> > ' Copy the settings from the Y axis to use the min-max calculated by

ChartFX

> > chart.Axis(AXIS_Y2).Min = chart.Axis(AXIS_Y).Min

> > chart.Axis(AXIS_Y2).Max = chart.Axis(AXIS_Y).Max

> >

> > ' Hide this axis and set the number of decimals

> > chart.Axis(AXIS_Y2).Visible = false

> > chart.Axis(AXIS_Y2).Decimals = 4

> >

> > --

> > Regards

> >

> > JC

> > Software FX Support

> >

> > "Stuart Thompson" <stuart_thompson@transcanada.com> wrote in message

> > news:3C768853.8B3A6BF9@transcanada.com...

> > > In ChartFX IE version 3.5, there is a property called DecimalsNum that

> > > enables you to specify the number of decimals to display on each of

the

> > > axes and also for the Point Values (Balloon, Dialog and Data-Editor).

> > >

> > > In the new version of ChartFX, there are properties on the AXIS object

> > > that enable you to set the decimal precision for the axes, but I can't

> > > find where I can set the decimal precision for point values (I want

more

> > > precision on the point values than I do on the axes).

> > >

> > > Am I missing where I can do this in the new version? Help!

> > >

> > > --

> > > Stuart Thompson

> > >

> > >

> > >

>

> --

> Stuart Thompson

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...