Jump to content
Software FX Community

Title.LineAlignment Meaningless??


User (Legacy)

Recommended Posts

Your API documentation states the following:

"By changing the LineAlignment value, you can control distance from the

title to the chart"

However, the type of LineAlignment is System.Drawing.StringAlignment. The

only legal values for this system enumerated type are "Near", "Center", and

"Far". How exactly is this intended to control distance?

I tried the following:

Chart1.Titles[0].LineAlignment = System.Drawing.StringAlignment.Near;

then:

Chart1.Titles[0].LineAlignment = System.Drawing.StringAlignment.Center;

and finally:

Chart1.Titles[0].LineAlignment = System.Drawing.StringAlignment.Far;

They all displayed the title at the same vertical position.

So, how can I control the vertical distance between a chart and its title?

I am stacking SVG trend graphs vertically, and not being able to control

where the title is severely hampers my efforts. Is this an SVG-only gaffe?

You seem to be setting the x of your tspan element based on the width of the

graph, how are you determining the y value? Setting LineGap seemed to have

no effect. Creating a TitleDockable object, assigning properties, and adding

it to the titles collection did nothing, either.

Thanks for your help.

Trey Schultz

Link to comment
Share on other sites

I tried a default chart with svg, image and .net generation, in all tests

the LineAlignment property works as expected.

Take a top title as an example, our default for the topgap (the distance

between the top of the chart and the "drawing area") is bigger than required

for 1 title line because this number was set so that the chart looks as

"symmetrical" as possible. When you set the LineAlignment to

StringAlignment.Near the title will be as closest to the drawing area as

possible, if you set LineAlignment to Far it will be as separated as

possible. Note that you are not controlling the distance as a numeric

argument even though you can independently change the TopGap property.

I am attaching two svg files generated with our most recent public build.

--

Regards,

JC

Software FX Support

"Trey Schultz" <trey.schultz@serveron.com> wrote in message

news:qWXKQHfTCHA.3104@webserver1.softwarefx.com...

> Your API documentation states the following:

>

> "By changing the LineAlignment value, you can control distance from the

> title to the chart"

>

> However, the type of LineAlignment is System.Drawing.StringAlignment. The

> only legal values for this system enumerated type are "Near", "Center",

and

> "Far". How exactly is this intended to control distance?

>

> I tried the following:

> Chart1.Titles[0].LineAlignment = System.Drawing.StringAlignment.Near;

> then:

> Chart1.Titles[0].LineAlignment =

System.Drawing.StringAlignment.Center;

> and finally:

> Chart1.Titles[0].LineAlignment = System.Drawing.StringAlignment.Far;

>

> They all displayed the title at the same vertical position.

>

> So, how can I control the vertical distance between a chart and its title?

>

> I am stacking SVG trend graphs vertically, and not being able to control

> where the title is severely hampers my efforts. Is this an SVG-only gaffe?

> You seem to be setting the x of your tspan element based on the width of

the

> graph, how are you determining the y value? Setting LineGap seemed to have

> no effect. Creating a TitleDockable object, assigning properties, and

adding

> it to the titles collection did nothing, either.

>

> Thanks for your help.

>

> Trey Schultz

>

>

Link to comment
Share on other sites

The title's .LineAlignment will make sense when the gap is bigger than the

title.

For example:

chart1.Titles[0].Text = "LEFT TITLE";

chart1.Titles[0].DockArea = DockArea.Left;

chart1.Titles[0].Alignment = StringAlignment.Near;

chart1.Titles[0].LineAlignment = StringAlignment.Far;

chart1.LeftGap = 100;

Will be different than:

chart1.Titles[0].Text = "LEFT TITLE";

chart1.Titles[0].DockArea = DockArea.Left;

chart1.Titles[0].Alignment = StringAlignment.Near;

chart1.Titles[0].LineAlignment = StringAlignment.Near;

chart1.LeftGap = 100;

--

FP

Software FX, Inc.

Attachments.zip

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...