Jump to content
Software FX Community

Simple, Easy to Answer Question


User (Legacy)

Recommended Posts

I've attached an image of my chart.  I need to figure out why them seem to

be individual series instead of one. Also, if I'm I set the axis to use

logbase = 10 and then set the min and max varialbles myself, what do I use

for the step value? Lastly, how do I set the vertical grid lines to just

show up over the labels themselves. I don't need the logarithm grid lines.

It's too distracting for this chart. The code I used is as follows:

double[] TimeValues = TempProfile.TimeArray;

double[] TempValues = TempProfile.TempArray;

string ProfileName = TempProfile.ProfileName;

// ChartFX.net charting code

// Instantiate a new chart

Chart1 = new SoftwareFX.ChartFX.Internet.Server.Chart(this);

// Open the VALUES channel specifying "nSeries" Series and "nPoints" Points

Chart1.OpenData(COD.Values, 1, TimeValues.GetLength(0));

Chart1.OpenData(COD.XValues, 1, TimeValues.GetLength(0));

// Code to set the data

for (int i = 0; i < TimeValues.GetLength(0); i++)

{

for (int j = 0; j < TimeValues.GetLength(0); j++)

{

Chart1.Value[i, j] = TempValues[i];

Chart1.XValue[i, j] = TimeValues[i];

}

}

// Close the VALUES and XVALUES channels

Chart1.CloseData(COD.Values);

Chart1.CloseData(COD.XValues);

// Set chart type

Chart1.Gallery = SoftwareFX.ChartFX.Gallery.Lines;

// Set AxisX settings

Chart1.AxisX.LogBase = 10;

Chart1.AxisX.LabelsFormat.Format = AxisFormat.Scientific;

Chart1.AxisX.Min = 1.00E-06;

Chart1.AxisX.Max = 1.00E+04;

//Chart1.AxisX.Step = "";

Chart1.AxisX.Gridlines = true;

Chart1.AxisX.MinorGridlines = false;

Chart1.AxisX.LabelAngle = 90;

// Set AxisY settings

Chart1.AxisY.LabelsFormat.Decimals = 0;

Chart1.AxisY.Min = 0;

Chart1.AxisY.Max = 450;

Chart1.AxisY.Step = 50;

Chart1.AxisY.Gridlines = true;

// Titles

Chart1.Titles[0].Alignment = System.Drawing.StringAlignment.Center;

Chart1.Titles[0].Font = new System.Drawing.Font("Arial", 10);

Chart1.Titles[0].Text = "DBA Temperature";

Chart1.AxisX.Title.Text = "Temperature (F)";

Chart1.AxisX.Font = new System.Drawing.Font("Arial", 8);

Chart1.AxisY.Title.Text = "Time (Hr)";

Chart1.AxisY.Font = new System.Drawing.Font("Arial", 8);

// Legend

Chart1.SerLegBox = true;

Chart1.SerLegBoxObj.Alignment = ToolAlignment.Near;

Chart1.SerLegBoxObj.Docked = Docked.Bottom;

Chart1.SerLegBoxObj.Font = new System.Drawing.Font("Arial", 6);

Chart1.Series[0].Legend = ProfileName.Trim();

Thanks in advance,

Beaudetious

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...