Jump to content
Software FX Community

Chart Title


User (Legacy)

Recommended Posts

Using ChartFX.NET 6.2 in a C# page I am attempting to set a title of a

chart. Here is the line of code that I am attempting to use:

Chart1.Title(0).Text = "Maloney Reservoir";

When I run the page I get the following error message:

Compiler Error Message: CS0117: 'SoftwareFX.ChartFX.Internet.Server.Chart'

does not contain a definition for 'Title'

Any ideas??

Thanks again,

Derek

Link to comment
Share on other sites

I used the sample code from the interactive samples and have the title

working now...

TitleDockable title = Chart1.Titles[0];

title.Alignment = StringAlignment.Center;

title.Font=new Font("Times New Roman",16,FontStyle.Bold);

title.Text = "Maloney Reservoir";

title.TextColor = Color.Brown;

Thanks,

Derek

"Derek Feagin" <ddfeagi@nppd.com> wrote in message

news:lJWd2jnFEHA.200@webserver3.softwarefx.com...

> Using ChartFX.NET 6.2 in a C# page I am attempting to set a title of a

> chart. Here is the line of code that I am attempting to use:

>

> Chart1.Title(0).Text = "Maloney Reservoir";

>

> When I run the page I get the following error message:

> Compiler Error Message: CS0117: 'SoftwareFX.ChartFX.Internet.Server.Chart'

> does not contain a definition for 'Title'

>

> Any ideas??

> Thanks again,

> Derek

>

>

Link to comment
Share on other sites

Correct. The Titles collection has an indexer. Indexers are accessed with []

in C# and parenthesis in VB

--

Regards,

JC

Software FX Support

"Derek Feagin" <ddfeagi@nppd.com> wrote in message

news:I%23HB6%23nFEHA.2432@webserver3.softwarefx.com...

> Thanks! It was that as well as it can not be (0) in C# apparently it must

> be [0].

>

> Thanks!

> Derek

>

> "SoftwareFX Support" <noreply@softwarefx.com> wrote in message

> news:HGmXj2nFEHA.200@webserver3.softwarefx.com...

> > The property name is Titles not Title.

> >

> > --

> > FP

> > Software FX

> >

> >

>

>

post-2107-13922365932461_thumb.png

post-2107-13922377121204_thumb.png

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...