Jump to content
Software FX Community

Problem in Bar and Line Chart


nilesh patel
 Share

Recommended Posts

Hi,

I face problem while generating Bar and Line Chart.

(1) Can we display -Ve no in Braces? i.e. i want to display -20 as (20) and the values comes from dataset.

(2) After 3 minor step line,i want 4th minor step line slighly larger.

(3) Can we display AxisY title at top of the highest value grid line?

Return(%)   <--- Here i want AxisY Title.

14 ____________________

12_____________________

(4) How to remove Border in Bar chart?

I do BorderObject=null but still it display border.

For further Query just mail me on: patel_nilesh83@indiatimes.com

Thanks in advance.

Link to comment
Share on other sites

> (1) Can we display -Ve no in Braces? i.e. i want to display -20 as (20) and the values comes from dataset.

Yes:

chart1.AxisY.LabelsFormat.CustomFormat = "#.00;(#.00)";

> (2) After 3 minor step line,i want 4th minor step line slighly larger.

All minor steps are equal. You can have different ticks from minor and major steps (chart1.AxisY.Grids.Major.TickMark and Chart1.AxisY.Grids.Minor.TickMark respectively.

> (3) Can we display AxisY title at top of the highest value grid line?

You can create a title at the top of the chart and align it to the left as follows:

TitleDockable title = new TitleDockable(); title.Text = "Top Title"; title.Alignment = StringAlignment.Near; chart1.Titles.Add(title);

Alternatively, you can set a pane title:

chart1.Panes[0].Title.Text = "Pane Title";

Or you can create a custom gridline at the Max value:

cl.ShowLine = false; cl.Value = chart1.AxisY.Max; cl.Text = "Custom Gridline"; chart1.ConstantLines.Add(cl);

> (4) How to remove Border in Bar chart?

chart1.Border = false;

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.

 Share

×
×
  • Create New...