Jump to content
Software FX Community

Editing Axes


User (Legacy)

Recommended Posts

Rephrase:

Is there any way of editing the Y-Axes Label after the chart has been bound

to a CrossTabDataProvider object?

Thanks

"Codex Twin" <codex@more.com> wrote in message

news:XgJR1CG5FHA.1708@webserver3.softwarefx.com...

> Is there any way of editing the text on Y-Axes of the chart after the

chart

> has been bound to a CrossTabDataProvider object?

>

> Thanks

>

>

>

Link to comment
Share on other sites

OK, I'm using the LabelsFormat.CustomFormat to pass a string formatter to

the axis' label.

The Y-Axis has the string which is in the range 0.00 - 100.00

And I want to simply want the label to have a % sign at the end.

When I use the obvious format string ("#.00%") all the label values are

multiplied by a factor 10:

axis = chart1.Axis[1];

axis.Visible = true;

axis.Min = 0;

axis.Step = 10;

axis.Max = 100;

axis.TextColor = System.Drawing.Color.Blue;

axis.Grid.Color = System.Drawing.Color.Blue;

axis.LabelsFormat.CustomFormat = "#.00%";

When I use SoftwareFX.ChartFX.AxisFormat.Percentage, I get the same thing

(values x10):

axis.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.Percentage;

What format string should I use?

Thanks

"Codex Twin" <codex@more.com> wrote in message

news:XgJR1CG5FHA.1708@webserver3.softwarefx.com...

> Is there any way of editing the text on Y-Axes of the chart after the

chart

> has been bound to a CrossTabDataProvider object?

>

> Thanks

>

>

>

impresion de grafico.doc

Link to comment
Share on other sites

We pass the CustomFormat to the .net formatting routines and they assume a % 

sign means the number should be multiplied by 100. You can confirm this by

running the following code

double d = 4;

MessageBox.Show(d.ToString("#.00%"));

Which will show 400%

To escape the % sign you can use single quotes as follows (note the single

quotes around the percent sign)

axis.LabelsFormat.CustomFormat = "#.00'%'";

--

JC

Software FX Support

"Codex Twin" <codex@more.com> wrote in message

news:qtGd72T5FHA.1996@webserver3.softwarefx.com...

> OK, I'm using the LabelsFormat.CustomFormat to pass a string formatter to

> the axis' label.

>

> The Y-Axis has the string which is in the range 0.00 - 100.00

> And I want to simply want the label to have a % sign at the end.

>

> When I use the obvious format string ("#.00%") all the label values are

> multiplied by a factor 10:

>

> axis = chart1.Axis[1];

> axis.Visible = true;

> axis.Min = 0;

> axis.Step = 10;

> axis.Max = 100;

> axis.TextColor = System.Drawing.Color.Blue;

> axis.Grid.Color = System.Drawing.Color.Blue;

> axis.LabelsFormat.CustomFormat = "#.00%";

>

> When I use SoftwareFX.ChartFX.AxisFormat.Percentage, I get the same thing

> (values x10):

> axis.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.Percentage;

>

>

> What format string should I use?

>

>

> Thanks

>

>

>

>

>

> "Codex Twin" <codex@more.com> wrote in message

> news:XgJR1CG5FHA.1708@webserver3.softwarefx.com...

>> Is there any way of editing the text on Y-Axes of the chart after the

> chart

>> has been bound to a CrossTabDataProvider object?

>>

>> Thanks

>>

>>

>>

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...