Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 SPC Control Chart Tools for .Net
 Gradient Chart Background
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Josh

23 Posts

Posted - 09 May 2008 :  09:16:44  Show Profile  Reply with Quote
I'm trying to apply a gradient background to an SPCBatchVariableControlChart, but I'm not having much success.

I tried referencing the LineGapChart example in the QCChart2D examples, but I feel that my problem may be due to my coordinate transform variable. Below is the code that I'm using to try and set the background.

      Dim pc As New ProbabilityCoordinates()
      pc.AutoScale(ChartObj.AUTOAXES_NEAR, ChartObj.AUTOAXES_FAR)

      Dim bg As New Background(pc, ChartObj.GRAPH_BACKGROUND, Color.FromArgb(0, 120, 70), _
      Color.FromArgb(0, 40, 30), ChartObj.Y_AXIS)
      chart.AddChartObject(bg)

      pc.SetScaleStartY(0)


I've also tried using CartesianCoordinates, as well as just setting a single color background.

Note: I was able to set single color background using the DefaultPlot/GraphBackgroundColor methods, but not by creating a new Background object.

Any help would be greatly appreciated.

quinncurtis

1164 Posts

Posted - 09 May 2008 :  09:38:34  Show Profile  Reply with Quote
The Background object already exists and you can't replace it. You can change it's properties though.

Me.PrimaryChart.GraphBackground.BackgroundMode = ChartObj.SIMPLEGRADIENTMODE
Me.PrimaryChart.GraphBackground.GradientStartColor = Color.Lavender
Me.PrimaryChart.GraphBackground.GradientStopColor = Color.White


The gradient will apply to the entire SPC Chart area, including the area under the data table. The cells of the table have their own foreground and background colors and they will overwrite the background gradient in the table area.
Go to Top of Page

Josh

23 Posts

Posted - 09 May 2008 :  09:49:22  Show Profile  Reply with Quote
Thank you very much; that does exactly what I'm looking for and much easier than the direction I was going.

I had initially looked at the GraphBackground property of chart.PrimaryChart, but it was readonly, so I moved on. I didn't bother to look at the properties within GraphBackground.

Any chance you could point me in the right direction to changing the color of the marker points (the green dots for each subgroup)?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 09 May 2008 :  10:17:08  Show Profile  Reply with Quote
You will find an example on page 221 of the QCSPCChart manual.

Me.PrimaryChart.ProcessVariableData.LineMarkerPlot.SymbolAttributes.PrimaryColor =Color.BlueViolet
Me.PrimaryChart.ProcessVariableData.LineMarkerPlot.SymbolAttributes.FillColor = Color.Beige
Go to Top of Page

Josh

23 Posts

Posted - 09 May 2008 :  10:24:35  Show Profile  Reply with Quote
Excellent!

I had headed in that direction by trying to set the FillColor on LineMarkerPlot, but didn't go down to the SymbolAttributes.

Thanks again for the quick and informative response.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07