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
 Real-Time Graphics Tools for .Net (VB and C#)
 AxisTitle
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

carlao

54 Posts

Posted - 15 Mar 2005 :  23:38:19  Show Profile  Reply with Quote
In the examples set we have two examples: ScrollingGroupPlotUserControl and LinePlotScrollBar. I copied the AxisTitle snippet code from the second example and inserted into the first one. Then, when I run the first example, now with a title, the Y title is not showed. To have the Y or X title showed need I use examples like the second?

Carlao

quinncurtis

1586 Posts

Posted - 16 Mar 2005 :  09:07:25  Show Profile  Reply with Quote
We don't see a problem. We added the axis title code below to the ScrollGroupPlotUserControl1 and the axes titles appeared as expected.


NumericAxisLabels yAxisLab2 = new NumericAxisLabels(yaxis2);
chartVu.AddChartObject(yAxisLab2);

// ADD starting here

Font titleFont = new Font("Microsoft Sans Serif", 10, FontStyle.Bold);
AxisTitle yaxistitle = new AxisTitle( yaxis1, titleFont, "Magnitude");
chartVu.AddChartObject(yaxistitle);

AxisTitle xaxistitle = new AxisTitle( xaxis, titleFont, "Time");
chartVu.AddChartObject(xaxistitle);

// End of addition

scrollFrame1 = new RTScrollFrame(this, stockOpen1, pTransform1, ChartObj.RT_FIXEDEXTENT_MOVINGSTART_AUTOSCROLL);
Go to Top of Page

blazermaniac

USA
27 Posts

Posted - 11 Jan 2016 :  19:09:37  Show Profile  Reply with Quote
I am unable to change the Y Axis Title Text. Following is an example of my code:

protected override void initChartType(DataSet ds, int numsamplespersubgroup)
{
int charttype = SPCControlChartData.INDIVIDUAL_RANGE_CHART;
numsamplespersubgroup = 1;
if (m_csp.m_NumDataPointsInView != 0)
numdatapointsinview = m_csp.m_NumDataPointsInView;
this.SecondaryChart.DisplayChart = true;
this.GraphStartPosX = 0.1;
if (clsGeneral.Instance().gReportType != frmReport.eReportType.None)
{
this.InitSPCBatchVariableControlChart(charttype,
numsamplespersubgroup, ds.Tables[0].Rows.Count);
}
else
{
if (Properties.Settings.Default.Chart_ShowAllPoints)
numdatapointsinview = ds.Tables[0].Rows.Count;
this.InitSPCBatchVariableControlChart(charttype,
numsamplespersubgroup, numdatapointsinview);
}
CartesianCoordinates cc = new CartesianCoordinates();
LinearAxis yAxis = new LinearAxis(cc, ChartObj.Y_AXIS);
yAxis.SetColor(Color.White);
this.AddChartObject(yAxis);
AxisTitle yaxistitle = new AxisTitle(yAxis, this.Font, "Max Cell");
yaxistitle.SetColor(Color.White);
this.AddChartObject(yaxistitle);

}
Go to Top of Page

quinncurtis

1586 Posts

Posted - 12 Jan 2016 :  10:48:15  Show Profile  Reply with Quote
This should have been posted under the QCSPCChart forum topic.

You can't arbitrarily add chart objects to the SPC Charts. That is because they are set up as templates, and already contain all of the chart objects they use. If you add others, they will be descarded in the first display update. So get rid of this code in your example:

CartesianCoordinates cc = new CartesianCoordinates();
LinearAxis yAxis = new LinearAxis(cc, ChartObj.Y_AXIS);
.
.
this.AddChartObject(yaxistitle);



The y-axis title for the primary chart is tied to the description of what calculation is used to calculate each new data point, the "MEAN" by default. You can change the description using the following code:

this.ChartData.GetCalculatedValueRecord(0).ValueDescription = "Max Cell";

That will change the y-axis title.
Go to Top of Page

blazermaniac

USA
27 Posts

Posted - 12 Jan 2016 :  11:03:45  Show Profile  Reply with Quote
Thank you so much!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07