Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vary Colors in the Same Data Series | Charts and Charting in Excel | |||
regarding allocation of chart series point colors | Charts and Charting in Excel | |||
vary row colors in excel? | Excel Discussion (Misc queries) | |||
Vary bar colors by bar | Charts and Charting in Excel | |||
Vary colors in area chart by x-axis value | Charts and Charting in Excel |