Jump to content
Software FX Community

AxisSection of X-axis overriding AxisSection of Y-axis


sridharj

Recommended Posts

When I draw a AxisSection for both X-axis and y-axis using different background colors for both, I can see that the X-axis section overrides (or draws on top)spilts the Y-axis section. Thus I dont get a continous Y-axis section.

I need the reverse of the above phonmenon i.e Y-axissection should be on top of the X-axissection. Is this a limitation with ChartFX .Net? Or is there any work around for this?

 Here is the code for the above. Have attached a snapshot.

DataTable dt = new DataTable();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

  dt.Columns.Add("XValue");

  dt.Columns.Add("YValue");

  for (int i = 0; i < 100; i += 10)

  {

  DataRow dr = dt.NewRow();

  dr["XValue"] = i;

  dr["YValue"] = i;

  dt.Rows.Add(dr);

  }

 

  Chart1.Reset();

  Chart1.DataSourceSettings.Fields.Add(new FieldMap("XValue", FieldUsage.XValue));

  Chart1.DataSourceSettings.Fields.Add(new FieldMap("YValue", FieldUsage.Value));

  Chart1.DataSource = dt;

 

  for (int j = 10; j < 100; j += 20)

  {

  AxisSection aX = new AxisSection(j, j + 10, System.Drawing.Color.FromArgb(242, 242, 242));

  Chart1.AxisX.Sections.Add(aX);

  }

 

  AxisSection aY = new AxisSection(40, 60, System.Drawing.Color.FromArgb(217, 217, 217));

  Chart1.AxisY.Sections.Add(aY);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...