Jump to content
Software FX Community

murugananth

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by murugananth

  1. Now it is working fine. Thank you very much for your help.
  2. Please anybody help me in solving this problem. you can find the screen shot and code and the problem description above posts
  3. Please find the sample code below. Chart.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Chart.aspx.cs" Inherits="Chart" %> <% @ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx" %><%@ Register Assembly="ChartFX.WebForms.Adornments" Namespace="ChartFX.WebForms.Adornments" TagPrefix="chartfxadornments" %> <% @ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms.Galleries" TagPrefix="chartfx7galleries" %><html xmlns="http://www.w3.org/1999/xhtml" > < head runat="server"><title>Untitled Page</title> </ head>< body> <form id="form1" runat="server"> <chartfx:Chart ID="ChartReport" EnableViewState="false" AllSeries-Gallery="Bar" Height="99%" Width = "100%" runat="server"> </chartfx:Chart> </form></body> </ html>--------------------------------------------------------------------------------------------------------------------------- Chart.aspx.cs using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using ChartFX.WebForms;using ChartFX.WebForms.DataProviders;public partial class Chart : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { // code for DataTableDataTable dt = new DataTable(); DataColumn dc1 = new DataColumn();dc1.ColumnName = "X"; dc1.DataType = Type.GetType("System.Int32");DataColumn dc2 = new DataColumn(); dc2.ColumnName = "Y";dc2.DataType = Type.GetType("System.Int32"); dt.Columns.Add(dc1); dt.Columns.Add(dc2); DataRow dr1,dr2,dr3,dr4,dr5; dr1 = dt.NewRow(); dr2 = dt.NewRow(); dr3 = dt.NewRow(); dr4 = dt.NewRow(); dr5 = dt.NewRow(); dr1["X"] = 1; dr1[ "Y"] = 50240;dr2["X"] = 2; dr2[ "Y"] = 6162;dr3["X"] = 3; dr3[ "Y"] = 248;dr4["X"] = 4; dr4[ "Y"] = 500;dr5["X"] = 5;dr5["Y"] = 150; dt.Rows.Add(dr1); dt.Rows.Add(dr2); dt.Rows.Add(dr3); dt.Rows.Add(dr4); dt.Rows.Add(dr5); // Code to generate Bar Chart ChartReport.RenderFormat = ".NET"; ChartReport.Height = Unit.Percentage(99);ChartReport.Width = Unit.Percentage(100); ChartReport.Gallery = Gallery.Bar;ChartReport.View3D.Enabled = true; ChartReport.View3D.BoxThickness = 10; ChartReport.AxisX.LabelsFormat.Format = AxisFormat.Number; ChartReport.AxisX.Title.Text = "X";ChartReport.AxisY.Title.Text = "Y"; DataTableProvider data = new ChartFX.WebForms.DataProviders.DataTableProvider(dt);CrosstabDataProvider cfxCT = new CrosstabDataProvider(); cfxCT.DataSource = data; ChartReport.DataSourceSettings.Fields.Add(new FieldMap("X", FieldUsage.RowHeading)); ChartReport.DataSourceSettings.Fields.Add( new FieldMap("Y", FieldUsage.ColumnHeading));ChartReport.DataSourceSettings.Fields.Add(new FieldMap("Y", FieldUsage.Value)); ChartReport.DataSource = cfxCT; ChartReport.RecalculateScale(); } }
  4. The Bar and the X-Axis label are not in the same line. Below is the screen shot.
  5. Thank you for ur reply AndreG. The Bar and X-axis lable are not in the same line. Below is the screenshot.
  6. I had developed a Bar chart using ChartFx 7.0. The problem is that the bar and x-axis values are not in the same line. Both are not in different positions Please anybody help me to fix this.
×
×
  • Create New...