Author |
Topic |
|
CalSchrotenboer
USA
11 Posts |
Posted - 20 Nov 2012 : 10:32:35
|
I have a number of styling questions which I would like to present.
1. What is the name of the line which represents the XBar values in an XBar chart and how can I change the color and width of that line? I am able to find and modify these properties for control lines and specification lines but I cant locate the XBar line object.
2. How can I access the Axis Labels and Titles in a stand-alone histogram chart in order to change their attributes such as FontFamily and FontSize? I am able to find these for the XBar chart as properties of the PrimaryChart and SecondaryChart but I cant locate the equivalent objects in the case of the histogram chart. 3. I would like to show an outline around my data points in an XBar chart. To learn about which properties are required for this, I created a simple tester application (which loads much faster than our production application). The following code successfully achieves what I would like to do in my tester application:
chartVu.PrimaryChart.ProcessVariableData.LineMarkerPlot.SymbolAttributes.PrimaryColor = Colors.Black; //Sets the outline of each individual data point chartVu.PrimaryChart.ProcessVariableData.LineMarkerPlot.SymbolAttributes.FillColor = Colors.ForestGreen; //Sets the fill color of each individual data point chartVu.PrimaryChart.ProcessVariableData.LineMarkerPlot.SymbolAttributes.LineWidth = 1; //Sets the width of the outline of each individual data point
However, when I use the identical code in our production application, this code has no effect. I have discovered that where in the sequence of execution you set certain properties is essential to this process and I have positioned this code in the production application at the same point as in the tester application. Moreover, I have tried to follow the same patterns in both applications to the greatest extent possible. Can you suggest what changes to make in order to achieve my goal?
4. The following code is used to set the color of the normal curve in my histogram chart:
QcChartView.NormalCurveAttribute.PrimaryColor = Colors.Purple;
When my histogram chart is displayed for the first time, this line of code is called but it does not have the desired effect. The application has a Refresh button which is used if the user wants to change one of the parameters for this chart, as for example, by increasing or decreasing the number of bins. This calls the identical code with a new set of parameters or even with the identical set of parameters if the user simply clicks the Refresh button without making any changes. When the above referenced code is called a second time, the line color changes to purple as desired. Do you have any idea why this code is not effective the first time that the chart is built? 5. In a similar problem to that described in the preceding paragraph, I am using the following code to change the FontSize of the Main Title: QcChartView.MainTitle.GetTextFont().FontSize = 5;
This code does not work when the chart is first built, nor when the Refresh button is clicked. However, if I navigate to a different tab in our application and then return to this tab and click the Refresh button the FontSize of the MainTitle changes to my desired setting. Any suggestions?
6. How can I access the text used to display the count of values in each bin in a stand alone histogram chart? I am referring to the numbers which appear at the top of each bin. I would like to be able to change the FontFamily and FontSize properties of this text.
7. Occasionally, one or more of the numbers referred to in the preceding paragraph either do not appear or are positioned at the top of the wrong column. I would be glad to send you a screenshot of an example. If I am able to reproduce this in a sample application, can you provide us with a fix?
We are using the Trial Version of SPC for WPF which we downloaded on November 12, 2012. QCSPCChartWPF3.dll 280 Kb. |
Edited by - CalSchrotenboer on 20 Nov 2012 11:04:26 |
|
quinncurtis
1586 Posts |
Posted - 20 Nov 2012 : 10:38:30
|
Please identify exactly which version of the software your are using - i. e. .Net, .Net WPF or .Net Silverlight. And when did you purchase and download the software?
|
|
|
CalSchrotenboer
USA
11 Posts |
Posted - 20 Nov 2012 : 11:05:03
|
We are using the Trial Version of SPC for WPF which we downloaded on November 12, 2012. QCSPCChartWPF3.dll 280 Kb. |
|
|
quinncurtis
1586 Posts |
Posted - 20 Nov 2012 : 12:17:44
|
1. spcChart.PrimaryChart.ProcessVariableData.LineMarkerPlot.LineAttributes.PrimaryColor = Colors.Blue; spcChart.PrimaryChart.ProcessVariableData.LineMarkerPlot.LineAttributes.LineWidth = 5;
2, ChartFont titlefont = new ChartFont("Times", 8, FontStyles.Normal); spcChart.YAxisTitle.TextFont = titlefont; spcChart.YAxisLab.TextFont = titlefont; spcChart.XAxisTitle.TextFont = titlefont; spcChart.XAxisLab.TextFont = titlefont;
3. Sorry, we cannot reproduce the problem. Once you have a commerical license to use the software, you can send us some sort of example program which reproduces the problem, and we will have to debug that.
4. You must be doing something out of sequence. If you set the color before the BuildChartcall, the color will match. You can verify this with our simple FrequencyHistogram example.
spcChart.NormalCurveAttribute.PrimaryColor = Colors.Purple; spcChart.BuildChart();
5. You can't change the size of an existing font. You must create a new one of the appropriate size. spcChart.MainTitle.TextFont = new ChartFont("Times", 5, FontStyles.Normal);
You must set it before the BuildChart call, as in 4.
6. spcChart.FrequencyHistogramPlot.PlotLabelTemplate.TextFont = new ChartFont("Times", 5, FontStyles.Normal);
7. Assuming you have a commercial license to use the software, if you send us an example program which reproduces the problem, we will provide some sort of fix.
|
|
|
CalSchrotenboer
USA
11 Posts |
Posted - 20 Nov 2012 : 13:00:03
|
Thanks for the exceptionally quick response.
Your answer to my question 1 gives me the line which connects the data points. That I already have.
I'm looking for the line which represents the arithmetic mean which in your chart is labeled as the XBar line. |
|
|
quinncurtis
1586 Posts |
Posted - 20 Nov 2012 : 13:47:10
|
You can set the target color using code like below: spcChart.PrimaryChart.GetControlLimitData(SPCChartObjects.SPC_CONTROL_TARGET).SPCPlotObj.ChartObjAttributes.PrimaryColor = Colors.Yellow;
If you want to just globally change the default colors, you can do that by setting some static properties in the SPCControlLimitRecord class. You must call these BEFORE any of the spc chart classes are instantiated, else they will not be in effect. So call them before InitializeComponent in your main window class.
public Window1() { SPCControlLimitRecord.DefaultHighAlarmColor = Colors.Turquoise; SPCControlLimitRecord.DefaultLowAlarmColor = Colors.Teal; SPCControlLimitRecord.DefaultTargetColor = Colors.Goldenrod; InitializeComponent(); ucc = new TimeVariableControlChart(spcChart1); spcChart1.PreferredSize = new Size(800, 600); } |
|
|
CalSchrotenboer
USA
11 Posts |
Posted - 20 Nov 2012 : 14:51:13
|
Thanks for the latest response. That is the line that I needed.
We just ordered two licenses. I take it that all we need to do is to remove the references to the old dlls and replace them with references to the new ones?
The outline on the data points problem (issue 3) has been resolved by relocating this code to a position before BuildChart().
I will prepare a tester application to demonstrate the problem described in my issue 7. |
|
|
quinncurtis
1586 Posts |
Posted - 20 Nov 2012 : 15:07:49
|
Thanks for your order. The software should install over the trial software, writing over the trial DLLs of the same name. If you have copied the trial DLLs to any other location, other than the default Quinn-Cutis\DotNet\lib folder, then you must update those with the newly installed DLLs: QCChart2DWPF3.DLL and QCSPCChartWPF3.DLL. In any project which references the DLLs, once the DLLs have been updated, make sure you do a Rebuild to force the project to update its copies of the DLLs.
Send any example projects (send the complete source in a zip file of the complete project, similar to one of our example programs) to support@quinn-curtis.com.
|
|
|
CalSchrotenboer
USA
11 Posts |
Posted - 21 Nov 2012 : 10:04:56
|
The UCL, LCL and XBAR lines are displayed above (Z-Order) the data points in my chart. Is it possible to set the data points (and the line connecting them) to the highest Z-Order position? |
|
|
quinncurtis
1586 Posts |
Posted - 21 Nov 2012 : 12:22:03
|
This should work. The default z-order for the limit lines is 50, and setting the line marker plot to 60 will place it on top.
spcChart.PrimaryChart.ProcessVariableData.LineMarkerPlot.ZOrder = 60;
|
|
|
CalSchrotenboer
USA
11 Posts |
Posted - 21 Nov 2012 : 13:04:40
|
Thanks. That worked. |
|
|
|
Topic |
|