ChartTypeBar3D: decimal precison

E

Eliyahu Goldin

I am setting series data with a call
series1.SetData (OWC11.ChartDimensionsEnum.chDimValues, (int)
OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, this.chartValues1);

In chartValues1 I have decimal values with one digit after the decimal
point. If the digit is zero, it doesn't render on the chart. For example,
"9.0" always renders as "9". Is there a way to preserve the trailing zero?



Eliyahu
 
A

Alvin Bruney - ASP.NET MVP

Yes, use a numberformat = "#.#" or "#,###.#" for large numbers

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
E

Eliyahu Goldin

Alvin,

Where in OWC can I specify this format? All value in chartValues1 are
formatted properly, with one digit after the decimal point, whether it's 0
or not. It is on the chart where the trailing 0 gets lost.

Eliyahu

Alvin Bruney - ASP.NET MVP said:
Yes, use a numberformat = "#.#" or "#,###.#" for large numbers

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Eliyahu Goldin said:
I am setting series data with a call
series1.SetData (OWC11.ChartDimensionsEnum.chDimValues, (int)
OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, this.chartValues1);

In chartValues1 I have decimal values with one digit after the decimal
point. If the digit is zero, it doesn't render on the chart. For example,
"9.0" always renders as "9". Is there a way to preserve the trailing zero?



Eliyahu
 
A

Alvin Bruney - ASP.NET MVP

Here is an example
dlSerieslLabels = serS.DdtdLdbelSCOllection.Add(;
dlSerieslLabels.NumberFormat = "$#,##0;[Red]$#,##0";
numberformats are available on most objects to include the axes and chart
titles

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Eliyahu Goldin said:
Alvin,

Where in OWC can I specify this format? All value in chartValues1 are
formatted properly, with one digit after the decimal point, whether it's 0
or not. It is on the chart where the trailing 0 gets lost.

Eliyahu

Alvin Bruney - ASP.NET MVP said:
Yes, use a numberformat = "#.#" or "#,###.#" for large numbers

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Eliyahu Goldin said:
I am setting series data with a call
series1.SetData (OWC11.ChartDimensionsEnum.chDimValues, (int)
OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, this.chartValues1);

In chartValues1 I have decimal values with one digit after the decimal
point. If the digit is zero, it doesn't render on the chart. For example,
"9.0" always renders as "9". Is there a way to preserve the trailing zero?



Eliyahu
 
E

Eliyahu Goldin

Thank you Alvin, setting dlSerieslLabels.NumberFormat = "0.0" did the trick.

Eliyahu

Alvin Bruney - ASP.NET MVP said:
Here is an example
dlSerieslLabels = serS.DdtdLdbelSCOllection.Add(;
dlSerieslLabels.NumberFormat = "$#,##0;[Red]$#,##0";
numberformats are available on most objects to include the axes and chart
titles

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Eliyahu Goldin said:
Alvin,

Where in OWC can I specify this format? All value in chartValues1 are
formatted properly, with one digit after the decimal point, whether it's 0
or not. It is on the chart where the trailing 0 gets lost.

Eliyahu

Alvin Bruney - ASP.NET MVP said:
Yes, use a numberformat = "#.#" or "#,###.#" for large numbers

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



I am setting series data with a call
series1.SetData (OWC11.ChartDimensionsEnum.chDimValues, (int)
OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, this.chartValues1);

In chartValues1 I have decimal values with one digit after the decimal
point. If the digit is zero, it doesn't render on the chart. For example,
"9.0" always renders as "9". Is there a way to preserve the trailing zero?



Eliyahu
 
A

Alvin Bruney - ASP.NET MVP

np

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Eliyahu Goldin said:
Thank you Alvin, setting dlSerieslLabels.NumberFormat = "0.0" did the trick.

Eliyahu

Alvin Bruney - ASP.NET MVP said:
Here is an example
dlSerieslLabels = serS.DdtdLdbelSCOllection.Add(;
dlSerieslLabels.NumberFormat = "$#,##0;[Red]$#,##0";
numberformats are available on most objects to include the axes and chart
titles

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



Eliyahu Goldin said:
Alvin,

Where in OWC can I specify this format? All value in chartValues1 are
formatted properly, with one digit after the decimal point, whether
it's
0
or not. It is on the chart where the trailing 0 gets lost.

Eliyahu

"Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
Yes, use a numberformat = "#.#" or "#,###.#" for large numbers

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



I am setting series data with a call
series1.SetData (OWC11.ChartDimensionsEnum.chDimValues, (int)
OWC11.ChartSpecialDataSourcesEnum.chDataLiteral, this.chartValues1);

In chartValues1 I have decimal values with one digit after the decimal
point. If the digit is zero, it doesn't render on the chart. For
example,
"9.0" always renders as "9". Is there a way to preserve the trailing
zero?



Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top