Hi,
I have a BASIC line chart that is setup as the following:
Y axis - Total Sales (Double)
X axis - Date Project Sold (Dattime converted to String in SQL)
Here is my code: NOTE ucMain is the chart:
ucMain.LineChart.TreatDateTimeAsString = true;
ucMain.Axis.X.TickmarkPercentage = 50;
//ucMain.Axis.X.Labels.ItemFormatString = "<ITEM_LABEL:mm/dd/yyyy>";
ucMain.DataSource = al.SQLDataSet.Tables["chart"];
ANY combo of this does not work. It is really drving me crazy.
Melegant
My problem is that lets say I have a query that returns 100 records for the X-axis. The x-axis will show all 100 lables no matter how I try to configure it. (in the above example I tried using percentage, intervals etc)>
Maybe I am missing something on how to correctly configure the chart to display ONLY let's say 10 percent of the records as labels. I did quite a bit of research and I must be missing one tiny line of code....
Try this quick example to see if you can get this very simple line chart working:
DataTable dt = new DataTable();dt.Columns.Add("col1", typeof(double));dt.Columns.Add("col2", typeof(string));dt.Rows.Add(new object[ { 10, "1/1/2008" });dt.Rows.Add(new object[ { 40, "1/2/2008" });dt.Rows.Add(new object[ { 20, "1/3/2008" });dt.Rows.Add(new object[ { 60, "1/4/2008" });ultraChart1.Data.SwapRowsAndColumns = true;ultraChart1.Data.DataSource = dt;If this somehow doesn't work, can you provide a bit more detail about how it doesn't work and what behavior you're seeing/expecting