Profile Picture

Hiding x axis

Posted By Marina Koronidou 12 Years Ago
Author
Message
Marina Koronidou
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 5, Visits: 1
Well I used AddHeader method instead and now it works.

I should have been using this method for the chart title anyway

Thanks again for the help!

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Marina,

The chart control can display multiple labels at the same time and the title shouldn't be affected. We were not able to reproduce this behavior, so can you please explain in more detail what happens?

Best Regards,
Nevron Support Team



Marina Koronidou
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 5, Visits: 1
Thanks, this approach works just fine.

My problem however now is that I am not able to keep the chart's title.

I was using the control.Panels.Add(title); command to add the title in my report and
now this has stopped working...



Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Marina,

For the message you can use a NLabel object like this one:

  NLabel label = new NLabel();
  label.Text = "No data selected";
  label.Location = new NPointL(new NLength(50, NRelativeUnit.ParentPercentage), new NLength(50, NRelativeUnit.ParentPercentage));
  label.ContentAlignment = ContentAlignment.MiddleCenter;
  label.Visible = false;
  nChartControl1.Panels.Add(label);


When it happens that data does not exist you can clear the chart series, hide the axes and make the "no data" label visible:

  chart.Series.Clear();
  chart.Axis(StandardAxis.PrimaryY).Visible = false;
  chart.Axis(StandardAxis.PrimaryX).Visible = false;
  label.Visible = true;

Here we don't replace the whole chart, but simply clear some of its settings to make it look empty.


Best Regards,
Nevron Support Team



Marina Koronidou
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 5, Visits: 1
Hi,

I am implementing a report where the data displayed change depending on values selected by the user.

The user clicks on a NEXT and PREVIOUS buttons, that change the date ranges and in turn this changes the
data displayed.

However, there is the possibility that no data exist for a particular date range.

So I had the idea of creating an empty chart to replace the initial chart every time there is no data.

For this to look nicer, I need to hide the x axis that is displayed by default and add a message
in the middle of the chart informing the user that there is no data available.

I have been searching for this for hours but I was not able to find a solution.

Can anyone give me a suggestion maybe?
Thanks
Marina



Similar Topics


Reading This Topic