I'm trying to create a log-log plot using UltraChart. I have 1 independent variable and 3 dependent variables. The values on the Y axis are looking fine, but the X axis is not working.
Here's my code:
public IDataGraph(int nval, double[ xValues, double[ yObsValues, double[ yFitValues, double val63)
{
InitializeComponent();
this.Graph1.ChartType = ChartType.LineChart;
// X-Axis
this.Graph1.Axis.X.Labels.ItemFormat = AxisItemLabelFormat.DataValue;
this.Graph1.Axis.X.NumericAxisType = NumericAxisType.Logarithmic;
this.Graph1.Axis.X.LogBase = 10.0;
this.Graph1.Axis.X.RangeMin = 10000;
this.Graph1.Axis.X.RangeMax = 100000;
this.Graph1.Axis.X.RangeType = AxisRangeType.Custom;
this.Graph1.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval;
this.Graph1.Axis.X.TickmarkInterval = 1;
this.Graph1.Axis.X.Labels.ItemFormatString = "<DATA_VALUE:0>";
// Y-Axis
this.Graph1.Axis.Y.NumericAxisType = NumericAxisType.Logarithmic;
this.Graph1.Axis.Y.LogBase = 10.0;
this.Graph1.Axis.Y.RangeMin = 1;
this.Graph1.Axis.Y.RangeMax = 10000;
this.Graph1.Axis.Y.RangeType = AxisRangeType.Custom;
this.Graph1.Axis.Y.TickmarkStyle = AxisTickStyle.DataInterval;
this.Graph1.Axis.Y.TickmarkInterval = 1;
this.Graph1.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:0>";
this.Graph1.LineChart.DrawStyle = LineDrawStyle.Solid;
this.Graph1.LineChart.Thickness = 4;
DataTable table = new DataTable();
// Add columns
table.Columns.Add("X", typeof(double));
table.Columns.Add("Y", typeof(double));
table.Columns.Add("Y1", typeof(double));
table.Columns.Add("Y2", typeof(double));
// Bottom, top, and left titles
this.Graph1.TitleBottom.HorizontalAlign = StringAlignment.Center;
this.Graph1.TitleBottom.Text = "X-Axis";
this.Graph1.Axis.X.Extent = 50; // Adjusts distance between axis and text
this.Graph1.TitleTop.Text = "Title";
this.Graph1.TitleTop.HorizontalAlign = StringAlignment.Center;
this.Graph1.TitleLeft.HorizontalAlign = StringAlignment.Center;
this.Graph1.TitleLeft.Text = "Y-Axis";
this.Graph1.Axis.Y.Extent = 50; // Adjusts distance between axis and text
this.Graph1.TitleLeft.Visible = true;
// Add values
for (int i = 0; i < nval; i++)
table.Rows.Add(new object[ {xValues[i], 100.0 * yObsValues[i], 100.0 * yFitValues[i], 100.0 * val63 });
}
this.Graph1.DataSource = table;
this.Graph1.DataBind();
// Events
this.Resize += new EventHandler(DataGraph_Resize);
// Resize
this.SetSizes();
The plot created from the code contains no points or lines and the X axis has no data. Basically, it's a blank chart with labels and a nice log scale on the Y axis.. Any help would be greatly appreciated!
Bump
developer support contacted me about this yesterday ... i found it was a bug that has already been fixed. the next hotfix that we release should resolve this problem.
Dave,
Thanks for the info. When do you think the hotfix will be released?
i really don't know; it depends on a lot of factors, like other product release schedules and regression bugs found during testing. Infragistics Developer Support can keep you up to date on that issue. also keep an eye on blogs.infragistics.com, because hotfixes are announced there regularly.