Jump to content
Software FX Community

Creating a Section in a bar chart


User (Legacy)

Recommended Posts

Hello,

I have a bar graph chart that has two bars per value on the x axis. I would

like to section the last xvalue. I was able to create a section that forms

on the last

x value and indicate it with a dashed line. The dashed line is created on

the x tick mark and is displayed in the center of the two bars. Is there a

way to get the dashed line to display in front of the two bars rather than

on the x value?

Thank you for any help.

Russ Murray

Link to comment
Share on other sites

Hello,

I gave it a try and the and section line is still displaying on the x tick mark between the two bars.

Obviously I am doing something wrong.

Here is the code snippet.

With MyBase.Chart.AxisSection

.From = Convert.ToDouble(MyBase.Chart.NValues) - 0.5 'To place dashed line in front of left bar

.To = MyBase.Chart.AxisSection.From + 0.5 'To place a dashed line after the right bar

.Grid.Style = Drawing.Drawing2D.DashStyle.Dash

.Grid.Width = 2

.Gridlines = True

End With

Thank you for your help.

Russ Murray

"Russ Murray" <russmurray1@comcast.net> wrote in message news:WfjZzTu5GHA.2308@webserver3.softwarefx.com...

> Thank you. I will give this a try.

>

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

> news:if4mRhj5GHA.3844@webserver3.softwarefx.com...

> > Yes. Simply assign the value of the custom gridline to be (LastIndex -

> 0.5).

> >

> > --

> > Francisco Padron

> > www.chartfx.com

> >

> >

>

>

Link to comment
Share on other sites

Hello,

Your screenshot illustrates what I want to do. I will modify my code to make the section stand out more. It maybe that my eyes need a check up.

Thank you for your help.

Russ Murray

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:yFMs9$V6GHA.3844@webserver3.softwarefx.com...

Can you please attach the screenshot and point to the line you are referring to and where do you want it to be.

I think we are talking about two different things because when I do this code I got what I expected (see attached screenshot).

--

Francisco Padron

www.chartfx.com

post-2106-13922378255008_thumb.png

Link to comment
Share on other sites

Hello,

I think all I need is a grid line to sepearte these particular bars from the others. I was looking through the documentation (online and the books) could not find how to create and place a custom gridline.

Thank you.

Russ Murray

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:UMupeMX6GHA.3388@webserver3.softwarefx.com...

You may want to try a Custom Gridline instead of a section.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

chart.AxisX.CustomGridlines.Add(new CustomGridline(value,text));

--

Francisco Padron

www.chartfx.com

"Russ Murray" <russmurray1@comcast.net> wrote in message

news:1bOIWNY6GHA.2308@webserver3.softwarefx.com...

Hello,

I think all I need is a grid line to sepearte these particular bars from the

others. I was looking through the documentation (online and the books) could

not find how to create and place a custom gridline.

Thank you.

Russ Murray

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

news:UMupeMX6GHA.3388@webserver3.softwarefx.com...

You may want to try a Custom Gridline instead of a section.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

PS: I'm not sure whether you are using Chart FX 6.2 or chart FX 7 so here is 

the code for 6.2 (previously I posted the code for 7.0):

chart.ConstantLines[0].Value = index - 0.5;

chart.ConstantLines[0].Axis = AxisItem.X;

Please check the docs, my Chart FX 6.x is a little rusty :-)

--

Francisco Padron

www.chartfx.com

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

news:GR%239Ejb6GHA.3388@webserver3.softwarefx.com...

> chart.AxisX.CustomGridlines.Add(new CustomGridline(value,text));

>

> --

> Francisco Padron

> www.chartfx.com

>

>

> "Russ Murray" <russmurray1@comcast.net> wrote in message

> news:1bOIWNY6GHA.2308@webserver3.softwarefx.com...

> Hello,

>

> I think all I need is a grid line to sepearte these particular bars from

> the others. I was looking through the documentation (online and the books)

> could not find how to create and place a custom gridline.

>

> Thank you.

>

> Russ Murray

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

> news:UMupeMX6GHA.3388@webserver3.softwarefx.com...

> You may want to try a Custom Gridline instead of a section.

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

Hello,

I'm using 6.2. and did see the constant line in the documentation. I will

give that a try.

Thanks.

Russ Murray

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

news:n0pg8kb6GHA.3388@webserver3.softwarefx.com...

> PS: I'm not sure whether you are using Chart FX 6.2 or chart FX 7 so here

is

> the code for 6.2 (previously I posted the code for 7.0):

>

> chart.ConstantLines[0].Value = index - 0.5;

> chart.ConstantLines[0].Axis = AxisItem.X;

>

> Please check the docs, my Chart FX 6.x is a little rusty :-)

>

> --

> Francisco Padron

> www.chartfx.com

>

>

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

> news:GR%239Ejb6GHA.3388@webserver3.softwarefx.com...

> > chart.AxisX.CustomGridlines.Add(new CustomGridline(value,text));

> >

> > --

> > Francisco Padron

> > www.chartfx.com

> >

> >

> > "Russ Murray" <russmurray1@comcast.net> wrote in message

> > news:1bOIWNY6GHA.2308@webserver3.softwarefx.com...

> > Hello,

> >

> > I think all I need is a grid line to sepearte these particular bars from

> > the others. I was looking through the documentation (online and the

books)

> > could not find how to create and place a custom gridline.

> >

> > Thank you.

> >

> > Russ Murray

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

> > news:UMupeMX6GHA.3388@webserver3.softwarefx.com...

> > You may want to try a Custom Gridline instead of a section.

> >

> > --

> > Francisco Padron

> > www.chartfx.com

> >

>

>

Link to comment
Share on other sites

Hello,

The constant line is doing exactly what I need it to do.

Thanks!

Russ

"Russ Murray" <russmurray1@comcast.net> wrote in message

news:o1RjQd56GHA.2308@webserver3.softwarefx.com...

> Hello,

>

> I'm using 6.2. and did see the constant line in the documentation. I will

> give that a try.

>

> Thanks.

>

> Russ Murray

>

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

> news:n0pg8kb6GHA.3388@webserver3.softwarefx.com...

> > PS: I'm not sure whether you are using Chart FX 6.2 or chart FX 7 so

here

> is

> > the code for 6.2 (previously I posted the code for 7.0):

> >

> > chart.ConstantLines[0].Value = index - 0.5;

> > chart.ConstantLines[0].Axis = AxisItem.X;

> >

> > Please check the docs, my Chart FX 6.x is a little rusty :-)

> >

> > --

> > Francisco Padron

> > www.chartfx.com

> >

> >

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

> > news:GR%239Ejb6GHA.3388@webserver3.softwarefx.com...

> > > chart.AxisX.CustomGridlines.Add(new CustomGridline(value,text));

> > >

> > > --

> > > Francisco Padron

> > > www.chartfx.com

> > >

> > >

> > > "Russ Murray" <russmurray1@comcast.net> wrote in message

> > > news:1bOIWNY6GHA.2308@webserver3.softwarefx.com...

> > > Hello,

> > >

> > > I think all I need is a grid line to sepearte these particular bars

from

> > > the others. I was looking through the documentation (online and the

> books)

> > > could not find how to create and place a custom gridline.

> > >

> > > Thank you.

> > >

> > > Russ Murray

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

> > > news:UMupeMX6GHA.3388@webserver3.softwarefx.com...

> > > You may want to try a Custom Gridline instead of a section.

> > >

> > > --

> > > Francisco Padron

> > > www.chartfx.com

> > >

> >

> >

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...