Jump to content
Software FX Community

VekiPeki

Members
  • Posts

    29
  • Joined

  • Last visited

VekiPeki's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, did you manage to fix this? We are having this same problem in Cfx 7 for WinForms. It happens sometimes when we zoom a part of a chart. Chart is divided into 2 panes. Stack trace indicates that the exception is thrown sometimes during text rendering: at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y, StringFormat format) at ChartFX.WinForms.Internal.GraphicsEx.DrawString(String s, Font font, Brush brush, Int32 x, Int32 y, StringFormat format) at ChartFX.WinForms.Internal.DrawText.a(IGraphicsEx A_0, Font A_1, Brush A_2, String A_3, Point A_4) at ChartFX.WinForms.Internal.DrawText.DrawString(IGraphicsEx gx, Font font, String text, Point pt) at ChartFX.WinForms.Axis.a(t A_0, AxisPaintInfo& A_1, Int32 A_2, Int32 A_3, SectionAttributes& A_4, Double A_5, Int32 A_6, Int32 A_7, Int32& A_8, Int32& A_9, Boolean A_10, Double A_11, Double A_12, Boolean A_13) at ChartFX.WinForms.Axis.a(PaintMarkBase A_0, Rectangle[] A_1, RepaintFlags A_2, AxisPaint A_3, SectionAttributes& A_4, AxisPaintInfo& A_5, Double A_6, Double A_7) at ChartFX.WinForms.Axis.a(t A_0, Rectangle[] A_1, RepaintFlags& A_2, AxisPaint A_3, AxisSection& A_4) at ChartFX.WinForms.AxisCollection.a(t A_0, Rectangle[] A_1, AxisPaint A_2) at ChartFX.WinForms.Pane.a(t A_0, Rectangle[] A_1, AxisPaint A_2) at ChartFX.WinForms.PaneCollection.a(t A_0, Rectangle[] A_1, AxisPaint A_2) at ChartFX.WinForms.t.b(Boolean A_0, Boolean A_1) at ChartFX.WinForms.t.a(IFrame A_0, PaintBar A_1, Int32& A_2) at ChartFX.WinForms.Chart.a(PaintBar A_0, IGraphicsEx A_1) at ChartFX.WinForms.al.a(PaintEventArgs A_0) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  2. Hello. Did you manage to resolve this? I am getting the same error in CFX 7 for WinForms. It happens sometimes when I zoom a part of a chart with multiple panes. Last few lines of the stack trace indicate that problem occurs during some text rendering:Stack trace: at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y, StringFormat format) at ChartFX.WinForms.Internal.GraphicsEx.DrawString(String s, Font font, Brush brush, Int32 x, Int32 y, StringFormat format) at ChartFX.WinForms.Internal.DrawText.a(IGraphicsEx A_0, Font A_1, Brush A_2, String A_3, Point A_4) at ChartFX.WinForms.Internal.DrawText.DrawString(IGraphicsEx gx, Font font, String text, Point pt) at ChartFX.WinForms.Axis.a(t A_0, AxisPaintInfo& A_1, Int32 A_2, Int32 A_3, SectionAttributes& A_4, Double A_5, Int32 A_6, Int32 A_7, Int32& A_8, Int32& A_9, Boolean A_10, Double A_11, Double A_12, Boolean A_13) at ChartFX.WinForms.Axis.a(PaintMarkBase A_0, Rectangle[] A_1, RepaintFlags A_2, AxisPaint A_3, SectionAttributes& A_4, AxisPaintInfo& A_5, Double A_6, Double A_7) at ChartFX.WinForms.Axis.a(t A_0, Rectangle[] A_1, RepaintFlags& A_2, AxisPaint A_3, AxisSection& A_4) at ChartFX.WinForms.AxisCollection.a(t A_0, Rectangle[] A_1, AxisPaint A_2) at ChartFX.WinForms.Pane.a(t A_0, Rectangle[] A_1, AxisPaint A_2) at ChartFX.WinForms.PaneCollection.a(t A_0, Rectangle[] A_1, AxisPaint A_2) at ChartFX.WinForms.t.b(Boolean A_0, Boolean A_1) at ChartFX.WinForms.t.a(IFrame A_0, PaintBar A_1, Int32& A_2) at ChartFX.WinForms.Chart.a(PaintBar A_0, IGraphicsEx A_1) at ChartFX.WinForms.al.a(PaintEventArgs A_0) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  3. I am trying to implement a custom zoom solution for ChartFX, and the code looks something like this: private Point startPoint = Point.Empty; // On mouse down, save the starting point void chart_MouseDownEvent(object sender, _ChartEvents_MouseDownEvent e) { startPoint = new Point(e.args.X, e.args.Y); } // On mouse up, zoom to coordinates void chart_MouseUpEvent(object sender, _ChartEvents_MouseUpEvent e) { if (e.args.Button != ButtonLeft) return; // override regular functionality e.args.Handled = true; Point endPoint = new Point(e.args.X, e.args.Y); Axis xAxis = chart.AxisX; Axis yAxis = chart.AxisY; double minX = xAxis.PixelToValue(startPoint.X); double maxX = xAxis.PixelToValue(endPoint.X); double minY = yAxis.PixelToValue(startPoint.Y); double maxY = yAxis.PixelToValue(endPoint.Y); if (!axChart1.Zoom) axChart1.Zoom = true; xAxis.Zoom(Math.Min(minX, maxX), Math.Max(minX, maxX)); yAxis.Zoom(Math.Min(minY, maxY), Math.Max(minY, maxY)); } The problem is that, after I handle the event, zoom selection dashed rectangle remains visible (and active as I move the mouse). I bypassed the standard functionality (I did set the Handled property to true), but it seems like it still remains in this "in-the-middle-of-zoom" mode. Does anyone have any experience with implementing custom zoom functionality? Maybe someone has encountered this before. Thanks a lot!
  4. We found this problem in both Chart FX Client Server 6.2 and Chart FX 7 (Windows Forms). Chart FX behaves unexpectedly when zooming the chart with multiple panes. In certain cases, zooming in on one of the panes completely messes up the other pane's scroll position. First of all, zooming across two panes will zoom in both panes. This is probably the intended behavior, but we would rather zoom in only the axis which was clicked first. Is it possible to change this behavior easily? The actual problem The problem happens when one of the panes (the upper one) is already zoomed, and you try too zoom in the other pane (the lower one) somewhere near its top. It seems that ChartFX this also zooms the upper pane in its relative coordinates, making it scroll to some small lower portion. Again, we found the same problem in both .NET and COM versions. Screencaps First, we zoom in the upper pane: This works as expected: Now we try to zoom in the second pane (problem occurs when you zoom near the adjacent pane): Notice what happened to the first pane: Is there a workaround for this? Thanks!
  5. How do I anchor an annotation to a different pane if I have multiple panes? E.g. this code: Annotation annots = new Annotations(); chart.Extensions.Add(annots); AnnotationArrow arrow = new AnnotationArrow(); annots.List.Add(arrow); // these coordinates are relative to chart.Panes[0] axis arrow.Attach(left, top, right, bottom); will anchor the arrow annotation to Pane[0] (and coordinates must be expressed relative to Pane[0] axis coordinates). Is there a way to attach annotations to a specific Axis or Pane?
  6. Hello! We have a problem drawing area charts using Chart FX 7 for Windows Forms (7.0.3306.26568). The problem is that the area chart is incorrectly rendered when the chart is zoomed and scrolled. We have had this problem earlier with Chart FX Client Server 6.2, but a hotfix for this was never released. Since we presumed that you are no longer maintaining the COM version (and presumed this has been fixed in new versions), we have moved to Chart FX 7, but the same bug occurs nevertheless. This is the code we used: void Form1_Load(object sender, EventArgs e){ ListProvider data = new ListProvider(); data.List = new ArrayList(); IList xData = new DateTime[] { DateTime.Now, DateTime.Now.AddHours(1), DateTime.Now.AddHours(2), DateTime.Now.AddHours(3), DateTime.Now.AddHours(4) }; IList yDataFrom = new int[] { 1, 2, 3, 4, 5 }; IList yDataTo = new int[] { 2, 3, 4, 5, 6 }; data.List.Add(xData); data.List.Add(yDataFrom); data.List.Add(yDataTo); chart1.Data.Clear(); chart1.Data.Series = 1; chart1.Data.Points = 5; chart1.Series[0].Gallery = Gallery.Area; chart1.Series[0].Color = System.Drawing.Color.FromArgb(196, Color.SteelBlue); chart1.AxisX.LabelsFormat.Format = AxisFormat.Time; chart1.DataSourceSettings.Fields.Clear(); chart1.DataSourceSettings.Fields.Add(new FieldMap("Field1", FieldUsage.XValue)); chart1.DataSourceSettings.Fields.Add(new FieldMap("Field2", FieldUsage.FromValue)); chart1.DataSourceSettings.Fields.Add(new FieldMap("Field3", FieldUsage.Value)); chart1.DataSource = data;} This is how the chart looks when the form is first loaded: And this is what we get when we zoom in and scroll to the middle of the chart: We have provided a sample application also. Thanks a lot and best regards, Veki
  7. From my experience, their support sucks. You cannot get any help except from other members, with exception for completely trivial questions. COM version is even less supported, and they haven't released a hotfix for 3 years, with several known and annoying bugs still existing. Ahh.. needed to relieve my soul to someone. What error exactly do you get? You could check the event log for example, or the setup log if it exists.
  8. I am sending a simple Test app, hoping that someone will finally reply. It's a .NET C# app using Cfx Client Server 6.2. public Form1() { InitializeComponent(); this.Load += new EventHandler(Form1_Load); } void UpdateChart() { // clear chart chart.ClearData(ClearDataFlag.ClearDataFlag_AllData); // fill list data provider with some data ListDataProviderClass listProvider = new ListDataProviderClass(); object xAxisData = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; object yAxisData = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; listProvider.AddCollection(ref xAxisData); listProvider.AddCollection(ref yAxisData); // enable data editor chart.DataEditor = true; // bind chart.DataSource = listProvider; // zoom programatically chart.Zoom = true; chart.AxisX.Zoom(2, 8); chart.AxisY.Zoom(2, 8); } void Form1_Load(object sender, EventArgs e) { // call it twice UpdateChart(); UpdateChart(); } Note that I am deliberately calling the code twice, before it gets painted. Our app has an interface where user can select lots of data from a tree-view and in some cases, when chart is updated before it gets time to repaint, then it crashes with an access violation.
  9. I found out that this happens if I try to use Axis.Zoom(min, max) or Axis.SetScrollView(min, max), before Chart starts to actually paint itself. It then crashes on next repaint. If I set the axis zoom after the PostPaint event, it will flicker once before it's zoomed, so is there another way I can set the axis zoom programatically, before the chart is painted?
  10. Update: I have added the PrePaint, GetAxisLabel and PostPaint event handlers to see what gets executed, and I can see that when the exception is thrown, only PrePaint gets fired. In other cases, all three events are fired. The exception happens sometimes when I am switching tab pages in my form, just before the chart is painted.
  11. Dear Sirs, My managed application is using Cfx Client Server 6.2 through COM interop. It sometimes closes with an Access violation error. Managed stacktrace looks like this: Using WinDbg, I have found that the exception happens in ChartFX.ClientServer.Core.dll: Unmanaged stack is shown like this (although it may be incorrect since I don't have debug info): Can you tell me if it's possible to find out which .dll function gets called in that moment( in the COM dll)? This usually happens when switching tabs, so I guess it happens during repaint.I hope that by finding this I could narrow the problem (I am using constant lines, regions,multiple axes+panes, filled area between series, lots of stuff), so I hope that it may at leastbring me closer to the point of fault.
  12. It seems that a workaround is to dock a Chart inside a Panel container, and then dock the Panel inside the Form - in that case data is displayed correctly. The problem happens only when Chart is docked inside a window directly (or if anyone still has the problem, then this just may be an indirect workaround).
  13. Hi! Does anyone know how to resolve this? I am having the same problem all morning - chart is displayed when a window is show as non-mdi, but as soon as I set MDIParent, I get the same result as in this post. f1 = (); f1.Show(); but f2 = ();f2.MdiParent = someParentForm; f2.Show();
  14. VekiPeki

    UserLegendBox

    You should not overwrite actual Point object with your own, rather just change their properties, i.e. try to change this: redPoint.Color = RGB(255,0,0)...Chart1.Point(0,j) = redPoint to this: redColor = RGB(255,0,0)...Chart1.Point(0,j).Color = redColor (for all lines where you assign colors)
×
×
  • Create New...