Tobias Posted February 24, 2009 Report Share Posted February 24, 2009 When I render a chart i get bold axis-labels, even if I set it to a regular-font. (see attachment) Can't figure out why... any ideas? < chartfx7:Chart ID="ChartIK" runat="server" ContextMenus="False" Height="250px" Width="300px" Visible="false"></chartfx7:Chart>ChartIK.AxisY.LabelsFormat.Decimals = 2;ChartIK.LegendBox.Visible = false;ChartIK.Border = new ChartFX.WebForms.Adornments.SimpleBorder(ChartFX.WebForms.Adornments.SimpleBorderType.None);ChartIK.Background = new ChartFX.WebForms.Adornments.SolidBackground(System.Drawing.Color.Transparent);ChartIK.DataSourceSettings.Fields.Add(new ChartFX.WebForms.FieldMap("period", ChartFX.WebForms.FieldUsage.Label));ChartIK.DataSourceSettings.Fields.Add(new ChartFX.WebForms.FieldMap("bar1", ChartFX.WebForms.FieldUsage.Value));ChartIK.DataSourceSettings.Fields.Add(new ChartFX.WebForms.FieldMap("bar2", ChartFX.WebForms.FieldUsage.Value));ChartIK.DataSourceSettings.Fields.Add(new ChartFX.WebForms.FieldMap("bar3", ChartFX.WebForms.FieldUsage.Value));ChartIK.DataSourceSettings.Fields.Add(new ChartFX.WebForms.FieldMap("line", ChartFX.WebForms.FieldUsage.Value));ChartIK.AxisX.LabelAngle = 45;ChartIK.AxisX.Step = 1;ChartIK.AxisX.Font = new System.Drawing.Font("Arial", 8, System.Drawing.FontStyle.Regular);ChartIK.AxisY.Font = new System.Drawing.Font("Arial", 8, System.Drawing.FontStyle.Regular);ChartIK.AxisY.LabelsFormat.Culture = new System.Globalization.CultureInfo("sv-SE"); // if(ChartIK.Series.Count > 3){ ChartIK.Series[0].Color = System.Drawing.Color.FromArgb(0, 0, 102); ChartIK.Series[1].Color = System.Drawing.Color.FromArgb(153, 204, 255); ChartIK.Series[2].Color = System.Drawing.Color.FromArgb(51, 102, 255); ChartIK.Series[3].Color = System.Drawing.Color.FromArgb(0, 0, 0); ChartIK.Series[3].BringToFront(); ChartIK.Series[0].MarkerShape = ChartFX.WebForms.MarkerShape.None; ChartIK.Series[0].Gallery = ChartFX.WebForms.Gallery.Lines; ChartIK.Series[1].Gallery = ChartFX.WebForms.Gallery.Bar; ChartIK.Series[2].Gallery = ChartFX.WebForms.Gallery.Bar; ChartIK.Series[3].Gallery = ChartFX.WebForms.Gallery.Bar;}ChartIK.DataBind();ChartIK.Visible = true; Quote Link to comment Share on other sites More sharing options...
CarlosAC Posted February 24, 2009 Report Share Posted February 24, 2009 Hi Tobias. I have confirmed that the issue you are having with a transparent background is by design. Chart FX engine paints the Fonts based on the background color of the chart for a better visualization, in your case the background is a transparency, so the engine does not know what color exists behind the Chart. Quote Link to comment Share on other sites More sharing options...
Tobias Posted February 25, 2009 Author Report Share Posted February 25, 2009 Thank you Carlos for your reply. You are quite right, by changing background to white it looks much better. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.