Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Vary Colors By Point

I am accessing excel through .NET C#..

I have two data series in a chart(XYScatterLines)..And I want to vary color
by point
of one series ...Infact I am not able to do that directly in excel manually...

Please help me out....

I even Tried following code..

grp = (ChartGroup)newChartObject.Chart.ChartGroups(1);
grp.VaryByCategories = true;


  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3,355
Default Vary Colors By Point

If you want to vary the colors by some known parameters, I've done it by
creating a series for each of the colors and only displaying the ponits that
are Yellow in one series, green in another. If I want the points connected,
I still plot the original series with connectors.
--
HTH,
Barb Reinhardt



"SrikanthAdimulam" wrote:

I am accessing excel through .NET C#..

I have two data series in a chart(XYScatterLines)..And I want to vary color
by point
of one series ...Infact I am not able to do that directly in excel manually...

Please help me out....

I even Tried following code..

grp = (ChartGroup)newChartObject.Chart.ChartGroups(1);
grp.VaryByCategories = true;


  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Vary Colors By Point

Hi Barb
Yeah I could make every line in the graph as a series and assign the color
index...It's a cool idea..

This serves my purpose...But I really think one should have a option of vary
by points for a series on a chart when there are more than one series on the
chart...

Anyways Thanx very much...

"Barb Reinhardt" wrote:

If you want to vary the colors by some known parameters, I've done it by
creating a series for each of the colors and only displaying the ponits that
are Yellow in one series, green in another. If I want the points connected,
I still plot the original series with connectors.
--
HTH,
Barb Reinhardt



"SrikanthAdimulam" wrote:

I am accessing excel through .NET C#..

I have two data series in a chart(XYScatterLines)..And I want to vary color
by point
of one series ...Infact I am not able to do that directly in excel manually...

Please help me out....

I even Tried following code..

grp = (ChartGroup)newChartObject.Chart.ChartGroups(1);
grp.VaryByCategories = true;


  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 5,600
Default Vary Colors By Point

You say your chart contains two series, but VaryByCategories can only be
applied to the ONE AND ONLY series on the chart. You could apply your own
colour to each point. Here's a VBA example

Sub VBPseries1()
Dim i As Long
Dim cht As Chart
Dim sr As Series
Dim pt As Point
Set cht = ActiveChart ' the selected chart
Set sr = cht.SeriesCollection(1)
i = 24
For Each pt In sr.Points
i = i + 1
If i Mod 57 = 0 Then i = 1
With pt
'.Border.ColorIndex = i ' only if Line
.MarkerForegroundColorIndex = i
.MarkerBackgroundColorIndex = i
End With
Next

End Sub

Regards,
Peter T



"SrikanthAdimulam" wrote in
message ...
I am accessing excel through .NET C#..

I have two data series in a chart(XYScatterLines)..And I want to vary

color
by point
of one series ...Infact I am not able to do that directly in excel

manually...

Please help me out....

I even Tried following code..

grp = (ChartGroup)newChartObject.Chart.ChartGroups(1);
grp.VaryByCategories = true;




  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Vary Colors By Point

Did you ever notice which colors are used for the separate points? They are
the same colors are used for separate series, so point 2 of series 1 would
use the default color of series 2.

But don't worry, I've thought of a way to get the effect you want. Create
your chart with two series. Move one of the series to the secondary axis.
You can delete the secondary axes and the secondary axis plot will still be
associated with the secondary axes but will plot along the primary axes.
Now, if you only have one series per axis group either or both can utilize
the Vary Colors By Point option.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"SrikanthAdimulam" wrote in
message ...
Hi Barb
Yeah I could make every line in the graph as a series and assign the color
index...It's a cool idea..

This serves my purpose...But I really think one should have a option of
vary
by points for a series on a chart when there are more than one series on
the
chart...

Anyways Thanx very much...

"Barb Reinhardt" wrote:

If you want to vary the colors by some known parameters, I've done it by
creating a series for each of the colors and only displaying the ponits
that
are Yellow in one series, green in another. If I want the points
connected,
I still plot the original series with connectors.
--
HTH,
Barb Reinhardt



"SrikanthAdimulam" wrote:

I am accessing excel through .NET C#..

I have two data series in a chart(XYScatterLines)..And I want to vary
color
by point
of one series ...Infact I am not able to do that directly in excel
manually...

Please help me out....

I even Tried following code..

grp = (ChartGroup)newChartObject.Chart.ChartGroups(1);
grp.VaryByCategories = true;






  #6   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 5,600
Default Vary Colors By Point

That's pretty cool!

Also illustrates my comment in the adjacent thread about vary colors by
point can only be applied to the sole series on the chart was wrong, rather
than a sole series per chart group.

Regards,
Peter T

"Jon Peltier" wrote in message
...
Did you ever notice which colors are used for the separate points? They

are
the same colors are used for separate series, so point 2 of series 1 would
use the default color of series 2.

But don't worry, I've thought of a way to get the effect you want. Create
your chart with two series. Move one of the series to the secondary axis.
You can delete the secondary axes and the secondary axis plot will still

be
associated with the secondary axes but will plot along the primary axes.
Now, if you only have one series per axis group either or both can utilize
the Vary Colors By Point option.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"SrikanthAdimulam" wrote in
message ...
Hi Barb
Yeah I could make every line in the graph as a series and assign the

color
index...It's a cool idea..

This serves my purpose...But I really think one should have a option of
vary
by points for a series on a chart when there are more than one series on
the
chart...

Anyways Thanx very much...

"Barb Reinhardt" wrote:

If you want to vary the colors by some known parameters, I've done it

by
creating a series for each of the colors and only displaying the ponits
that
are Yellow in one series, green in another. If I want the points
connected,
I still plot the original series with connectors.
--
HTH,
Barb Reinhardt



"SrikanthAdimulam" wrote:

I am accessing excel through .NET C#..

I have two data series in a chart(XYScatterLines)..And I want to vary
color
by point
of one series ...Infact I am not able to do that directly in excel
manually...

Please help me out....

I even Tried following code..

grp = (ChartGroup)newChartObject.Chart.ChartGroups(1);
grp.VaryByCategories = true;






  #7   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Vary Colors By Point

Yeah, but I'm not into rubbing people's noses in it. Well, not people I
like.

Any way, I'd have said the same thing, but for some reason a little voice
encouraged me to try something.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
That's pretty cool!

Also illustrates my comment in the adjacent thread about vary colors by
point can only be applied to the sole series on the chart was wrong,
rather
than a sole series per chart group.

Regards,
Peter T

"Jon Peltier" wrote in message
...
Did you ever notice which colors are used for the separate points? They

are
the same colors are used for separate series, so point 2 of series 1
would
use the default color of series 2.

But don't worry, I've thought of a way to get the effect you want. Create
your chart with two series. Move one of the series to the secondary axis.
You can delete the secondary axes and the secondary axis plot will still

be
associated with the secondary axes but will plot along the primary axes.
Now, if you only have one series per axis group either or both can
utilize
the Vary Colors By Point option.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"SrikanthAdimulam" wrote in
message ...
Hi Barb
Yeah I could make every line in the graph as a series and assign the

color
index...It's a cool idea..

This serves my purpose...But I really think one should have a option of
vary
by points for a series on a chart when there are more than one series
on
the
chart...

Anyways Thanx very much...

"Barb Reinhardt" wrote:

If you want to vary the colors by some known parameters, I've done it

by
creating a series for each of the colors and only displaying the
ponits
that
are Yellow in one series, green in another. If I want the points
connected,
I still plot the original series with connectors.
--
HTH,
Barb Reinhardt



"SrikanthAdimulam" wrote:

I am accessing excel through .NET C#..

I have two data series in a chart(XYScatterLines)..And I want to
vary
color
by point
of one series ...Infact I am not able to do that directly in excel
manually...

Please help me out....

I even Tried following code..

grp = (ChartGroup)newChartObject.Chart.ChartGroups(1);
grp.VaryByCategories = true;








  #8   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 5,600
Default Vary Colors By Point

:-)

Peter T

"Jon Peltier" wrote in message
...
Yeah, but I'm not into rubbing people's noses in it. Well, not people I
like.

Any way, I'd have said the same thing, but for some reason a little voice
encouraged me to try something.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
That's pretty cool!

Also illustrates my comment in the adjacent thread about vary colors by
point can only be applied to the sole series on the chart was wrong,
rather
than a sole series per chart group.

Regards,
Peter T

<snip


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vary Colors in the Same Data Series Joseph Reilly Charts and Charting in Excel 4 September 12th 07 08:32 PM
regarding allocation of chart series point colors David Charts and Charting in Excel 2 October 27th 06 09:18 AM
vary row colors in excel? bob the bolder Excel Discussion (Misc queries) 1 July 26th 06 04:34 PM
Vary bar colors by bar Tim Charts and Charting in Excel 1 April 3rd 06 08:20 PM
Vary colors in area chart by x-axis value Deirdre M. Charts and Charting in Excel 1 October 12th 05 10:09 PM


All times are GMT +1. The time now is 02:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"