Jump to content
Software FX Community

sachinj

Members
  • Posts

    13
  • Joined

  • Last visited

sachinj's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Frank, We were using ChartFX 6.2 in our application which is quite huge and complicated. Recently, we purchased the licenses for the newer version 7.0. When I tried using the charts in our application I got the crash message that I posted. In our application we are creating a number of threads to generate different charts. This used to work fine with version 6.2 but suddenly started crashing with version 7.0. The sample code I posted is my attempt to replicate the problem. It is not exactly how we are doing it in our application. However, the thing that is identical is creating a new thread and calling the renderControl method from IIS. In our UI we are creating a number of charts dynamically and each one is rendered in a different thread which gives me the crash. What you are implying hat the functionality that we used to have, to be able to render the charts in a different thread is no longer availble in the version 7.0. This would lead us to downgrade our application back to version 6.2. Let me know if this a correct assumption. Thanks. Sachin
  2. Hi, This issue happens with the 7.0 version of ChartFX librraries. It works fine without crashing when I try to use the older 6.2 version. Can anyone form SoftwareFX help me resolve this issue? Thanks. Sachin
  3. I have attached a sample application that you can use to easily replicate the poblem.
  4. Frank, I copied the code from our application in this format where the chart is generated in the Page Load method. I changed the sample code to create the chart in the CreateChildControls function. But the crash happened in that code as well. I don't think the problem is related to Page Life Cylce. Another thing I noticed is that this code runs without crashing if I use the VS 2008 built in webserver. This code crashes on the chart render line only when I use IIS with VS 2008 or if I deploy this in IIS. One more thing I found is that it works fine if I call the GetNewChart() functions directly in the Page Load method. So the crash happens if I create the chart in a new threads and run it under IIS. I think the ChartFX libraries tries to access something for which it doesn't have pemission under IIS? Can you tell me how get rendering information of chart in difrerent thread running in IIS? Thanks. Sachin
  5. Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> I am using ChartFX 7.0. I am getting a crash when calling the render control method of the chart [Chart1.RenderControl(MyHtmlWriter);]. The chart is created dynamically. The crash does not happens always. It happens only occasionally. When the chart works without crashing I get a license WARNING at the bottom of the chart. But the chart gets displayed. I am running the charts in the different threads to make several charts run in parallel. Please let me know why it is crashing the chart. I am able to replicate a workflow in our application where the crash always happens. It seems like something is not initialized properly inside the ChartFX libraries which gives me the crash. Thanks. Sachin Here is the error that I am receiving: Object reference not set to an instance of an object. at ChartFX.WebForms.Internal.b.a(OutputText A_0, Exception A_1, IServerControl A_2) at ChartFX.WebForms.Chart.a(Stream A_0, IOutputWriter A_1, OutputText A_2, OutputText A_3, OutputInfo A_4) at ChartFX.WebForms.Chart.a(OutputText A_0, OutputText A_1, Boolean A_2, String A_3, String A_4) at ChartFX.WebForms.Chart.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) Here is the sample source code that I am using: using System; using System.Threading; using System.IO; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace WebApplication1 { public partial class TestPage : System.Web.UI.Page { string m_Chart = "";protected void Page_Load(object sender, EventArgs e) { string chartResponse = "";Thread WorkerThread = new Thread(new ThreadStart(GetNewChart)); WorkerThread.Start(); Thread.Sleep(10000); Response.Write(m_Chart); } public ChartFX.WebForms.Chart GetNewChart(ref string data) { ChartFX.WebForms.Chart Chart1 = new ChartFX.WebForms.Chart(); Chart1.ID = "C" + System.Guid.NewGuid().ToString();Chart1.LegendBox.Visible = false; Chart1.Gallery = ChartFX.WebForms. Gallery.Bar;Chart1.AxisX.Title.Text = "Date";Chart1.AxisX.Visible = true; Chart1.AxisX.LabelAngle = 0; Chart1.ToolTips = true;Chart1.Titles.Add(new ChartFX.WebForms.TitleDockable("Workcenter Utilization by Date")); Chart1.AxisY.Title.Text = "Utilization (%)";Chart1.AxisY.LabelsFormat.Format = ChartFX.WebForms.AxisFormat.Percentage; Chart1.AllSeries.PointLabels.Format = "%v";Chart1.Visible = true; Chart1.Data.Series = 27; Random rnd = new Random(12);for (int i = 1; i < 27; i++) { for (int col = 1; col < 31; col++) { if (col == 1) { Chart1.Series[i - 1].Text = "Legend" + i.ToString(); } Chart1.Data[i - 1, col - 1] = rnd.Next() * 20; } } for (int i = 1; i < 31; i++) { Chart1.AxisX.Labels[i - 1] = "08/22/08"; } Chart1.Height = 375; Chart1.Width = 600; System.IO.StringWriter MyTextWriter = new System.IO.StringWriter(); System.Web.UI. HtmlTextWriter MyHtmlWriter = new System.Web.UI.HtmlTextWriter(MyTextWriter); Chart1.RenderControl(MyHtmlWriter); //THE CRASH OCCURS ON THIS LINE OF CODE MyHtmlWriter.Close(); string MyHtml = MyTextWriter.GetStringBuilder().ToString(); data = MyHtml; return Chart1; } public void GetNewChart() { GetNewChart(ref m_Chart); } } } Attached is the warning message related to the license that I receive when chart runs without crashing:
  6. Hi, I am dynamically creating a chart and I am getting the object reference error when I try to run the following code: System.IO. StringWriter MyTextWriter = new System.IO.StringWriter();HtmlTextWriter MyHtmlWriter = new HtmlTextWriter(MyTextWriter);chart1.RenderControl(MyHtmlWriter); //Crashes here with the above error It works fine some times but crashes other times. I am not able to figure out the reason for the crash. Can anyone provide me with any more insight. Thanks. Sachin Here is the call stack for the crash.: Object reference not set to an instance of an object. at ChartFX.WebForms.Internal.b.a(OutputText A_0, Exception A_1, IServerControl A_2) at ChartFX.WebForms.Chart.a(Stream A_0, IOutputWriter A_1, OutputText A_2, OutputText A_3, OutputInfo A_4) at ChartFX.WebForms.Chart.a(OutputText A_0, OutputText A_1, Boolean A_2, String A_3, String A_4) at ChartFX.WebForms.Chart.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
  7. I am able to get the tooltip to work now. However, there is a page where we have multiple charts created dynamically and the chartId's are not getting set properly. It used to work fine in version 6.2. I checked the code and all the image maps have the same name.
  8. Hi, We have a page where we are dynamically creating multiple charts. Each chart creates it own unique id using a guid. The charts are then displayed on this page. The charts used to work fine with version 6.2. However, when we upgraded to version 7.0, the chart Id of all the charts is blank. I am using the chartFX wrapper class for doing the migration. As a result all the charts are using the image map. Here is the html code for the chart that is generated: <img id="" src="/chartfx70/temp/CFT0904_0506082350B.png" WIDTH="760" HEIGHT="300" usemap="#Map" border="0"/> And here is the code that is generated with version 6.2 <IMG SRC="/chartfx62/temp/CFT0904_04333201F09.png" WIDTH="760" HEIGHT="300" usemap="#Ca159c6ee-5dea-480d-9bdb-a5150c3c12f4" border="0"> How do I make sure that the chartId is set and a distinct map name is generated? Thanks. Sachin
  9. Hi, I am using chartFX 7.0 and I am seeing problem when sometiemes the chart is not displayed. Instead of the chart and "X" mark is displayed as if it couldn't retrive the chart image. When I looked in the html source code, I see the following image tag : <img id="_ctl1" src="/chartfx70/pss/ChartFX.aspx?id=0-090411190&type=png&mime=image%2fpng" WIDTH="888" HEIGHT="300" usemap="#_ctl1Map" border="0"/> When I restart my computer the chart seems to be working file and the correct image tag is displayed: <img id="_ctl1" src="/chartfx70/temp/CFV0904_01505108BA1.png" WIDTH="888" HEIGHT="300" usemap="#_ctl1Map" border="0"/> I have had this problem a few times and everytime I need to restart the machine. Does anyone know why the incorrect image tag is generated and how to prevent that from happening. Thanks. Sachin
  10. Hi Frank, After adding the statement to disable AJAX, it is not showing all these characters at the top. However, I am having some truoble showing the ImgMap on the chart. I am using the following two statements: InvChart.ImgMap = ImgMap.TitleTip; //This statement gives run time error: Method or operation not implemented InvChart.TipMask="%L"; I couldn't find the equivalent statement in the wrapper class for setting the image map to TitleTip. There is no property InvChart.ChartFX7Object.ImageSettings.EmbeddedMap = true; Please let me know how do I display the image maps. Thanks. Sachin
  11. Hi Mark, Thanks for responding to me. We are creating the chart Manually and are not creating it via design time support. We are using only the wrapper class for migrating our code. It does not support the function ImageSettings. Please let me know the correct way for rendering the chart or if I can provide more information. Thanks. Sachinhere is the sample code: using SoftwareFX.ChartFX.Wrapper;using SoftwareFX.ChartFX.Wrapper.Internet.Server; protected SoftwareFX.ChartFX.Wrapper.Internet.Server.Chart InvChart;InvChart.Width=INV_CHART_WIDTH;InvChart.TopGap=CHART_GAP_TOP;InvChart.BottomGap=CHART_GAP_BOTTOM;InvChart.RightGap=CHART_GAP_RIGHT;InvChart.LeftGap=CHART_GAP_LEFT;InvChart.BorderObject = new DefaultBorder(BorderType.None);InvChart.Titles[0].Text="";InvChart.AxisX.Title.Text="";InvChart.AxisY.Title.Text="";InvChart.AxisY2.Title.Text="";InvChart.UserLegendBox = false;InvChart.SerLegBox = false; InvChart.Visible= true;InvChart.ToolBar = false;InvChart.MenuBar = false;InvChart.HtmlTag = "jpeg";InvChart.ImageSettings.Interactive = false; // This statement gives compile time error indicating ImageSetting not found in the wrapper classInvChart.ClearData(ClearDataFlag.AllData);InvChart.Titles[0].Text = "Inventory";InvChart.AxisX.Title.Text = "Log Date";InvChart.AxisY.Title.Text = "Quantity (" + m_Units + ")";InvChart.AxisY.LabelsFormat.CustomFormat = "0";InvChart.AxisX.LabelsFormat.Format = AxisFormat.Date;InvChart.SerLegBox=true;InvChart.SerLegBoxObj.Docked = Docked.Top;InvChart.MarkerShape = MarkerShape.None;InvChart.Cluster = true;InvChart.ImgMap = ImgMap.TitleTip; //This statement gives run time error: Method or operation not implementedInvChart.TipMask="%L";InvChart.OpenData(COD.Values, SeriesCount, (int)COD.Unknown); //Code for populating the chart InvChart.CloseData( COD.Values);
  12. Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> We are in the process of upgrading our application from Chart FX .Net (v6.2) to v 7.0. We are doing the migration using the ChartFX.WebForms.Wrapper assembly. I have renamed all the instances of ChartFX.Internet to ChartFX.Wrapper.Internet. I have also renamed all the other function calls. The code is now compiling without any error. However, the output that we get has lot of junk at the top. Previously, it didn
×
×
  • Create New...