Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4165
X-Axis Tickmarkstyle not working with Line Chart
posted

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:

al.InitViewChart(ucMain, "chart", daChart); // this just sets up the DataAdapter and sql stuff

ucMain.LineChart.TreatDateTimeAsString = true;

ucMain.Axis.X.Labels.Layout.Behavior = Infragistics.UltraChart.Shared.Styles.AxisLabelLayoutBehaviors.Auto;ucMain.Axis.X.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.AxisTickStyle.Smart;

 

ucMain.Axis.X.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.
AxisTickStyle.Percentage;

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

Parents
  • 26458
    Offline posted

    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

Reply Children