I've been working on a line chart for a project, and managed to solve all o fmy questions, save one. I changed the font size of the chart's X and Y axis labels to 15, then hit save. I noticed that on the designer, the changes were shown. However, when I hit preview to test those changes, the font remains the same 8.25 it was before. The properties field shows the font size I asked for as well. Needless to say, I am little confused as to why Telerik is refusing to accept changes. Does this have to happen programatically, instead of the properties interface?
5 Answers, 1 is accepted
Thanks for the quick response!!
Although we push our efforts in creating an unique report designer, so that you can do everything from design time, there are still cases when one would have to write a few lines of code, after all Telerik Reporting is a tool aiming at developers and it requires developer skills.
I've attached a screenshot that shows the line of code we added after InitializeComponent in the Report.cs file.
Hope this helps.
the Telerik team
.chart2.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial", 15F);
this.chart2.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Capacity";
It pretty much breaks the chart. I'm sorry that this is so frustrating, but I just can't figure this thing out. Having a properties menu that doesn't work doesn't help things either.
As explained earlier, the properties menu runs, but the style properties are overridden when you use Skin. This behavior is by design and cannot be changed. If you aim at entirely customizing your chart look, then remove the Skin of the chart and set its style manually from the designer and you won't have to write a single line of code.
I've also included a report that shows the correct behavior of the code you're trying to use. Note that in order for the AxisLabel text to show, you should set its Visible property to true first as it is hidden by default. Place the attached report in your application and run it to see the code is taken into account.
the Telerik team