Jump to content
Software FX Community

karin

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About karin

  • Rank
    Newbie
  1. Support Service, I have a problem trying to plot a note(annotation) on the chart (WindowsForms). So I created a simple project and repeated the procedure and the error still persists. On the event Highlighted() of the chart, I tried to plot a note(annotation) by adding the 'Extention' chart.Extensions.Add (***), which is giving an error on the screen (one red'X'on the entire chart). I'm using version 6.2 of the Chart. I wonder if there is a problem with this component on this version, because I did the same for version 7 and it worked. (On my atual code I can not migrate to version 7, I must continue using version 6.2 and I need to solve it!) I am sending the code. I need an answer with the most urgency. We work with Oil and Gas Projects, and we are about to deliver/deploy a new version. Thanks in advance and waiting for your response. Karin -----------------------------------------------------CODE:---------------------------------------------------------------------- using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using SoftwareFX.ChartFX; using SoftwareFX.ChartFX.Annotation; using SoftwareFX.ChartFX.Extensions; namespace BallomChart { public partial class Form1 : Form { public Form1() { InitializeComponent(); plotPoints(); this.chart1.Highlighted += chart1_Highlighted; } void chart1_Highlighted(object sender, SoftwareFX.ChartFX.Base.HighlightEventArgs e) { AnnotationX annot = new AnnotationX(); AnnotationBalloon balloon = new AnnotationBalloon(); annot.List.Clear(); annot.List.Add(balloon); chart1.Extensions.Add(annot); balloon.TailCorner = 2; balloon.ArrowFactor = 40; balloon.Border.Color = System.Drawing.Color.Black; balloon.Color = System.Drawing.Color.White; balloon.Text = "Test"; double x = chart1.XValue[e.Series, e.Point]; double y = chart1.Value[e.Series, e.Point]; balloon.Attach(System.Drawing.StringAlignment.Near, x, System.Drawing.StringAlignment.Far, y); chart1.Refresh(); chart1.CloseData(COD.Values); } void plotPoints() { chart1.Height = 350; chart1.Width = 500; chart1.Gallery = Gallery.Lines; // Passing data chart1.OpenData(COD.Values, 2, 6); chart1.OpenData(COD.XValues, 2, 6); chart1.Value[0, 0] = 10; chart1.Value[0, 1] = 62; chart1.Value[0, 2] = 42; chart1.Value[0, 3] = 16; chart1.Value[0, 4] = 96; chart1.Value[0, 5] = 74; chart1.Value[1, 0] = 45; chart1.Value[1, 1] = 22; chart1.Value[1, 2] = 27; chart1.Value[1, 3] = 38; chart1.Value[1, 4] = 68; chart1.Value[1, 5] = 91; chart1.XValue[0, 0] = 1; chart1.XValue[0, 1] = 2; chart1.XValue[0, 2] = 3; chart1.XValue[0, 3] = 4; chart1.XValue[0, 4] = 5; chart1.XValue[0, 5] = 6; chart1.XValue[1, 0] = 7; chart1.XValue[1, 1] = 8; chart1.XValue[1, 2] = 9; chart1.XValue[1, 3] = 10; chart1.XValue[1, 4] = 11; chart1.XValue[1, 5] = 12; chart1.CloseData(COD.Values); chart1.CloseData(COD.XValues); } } }
  2. I have a graph in the format ( num x num ) and I created an additional axis "X" in which could be possible associate an especific date to each point (x,y) in the axis "X". It was necessary to create an axis and define it as YAxis = false. I would like to know cho the "chartFX" could position the dates according to the points that where defined. Since , when defining the lables of the new axis, the dates are placed equally espaced among them. I created an exemple bellow with 4 points. I would like to put this dates in the same position. Is it possible? chart1.OpenData(SoftwareFX.ChartFX.COD.Values | SoftwareFX.ChartFX.COD.AllocHidden, 1, (int)SoftwareFX.ChartFX.COD.Unknown); chart1.OpenData(SoftwareFX.ChartFX.COD.XValues | SoftwareFX.ChartFX.COD.AllocHidden, 1, (int)SoftwareFX.ChartFX.COD.Unknown); chart1.XValue[0, 0] = 1.5; chart1.XValue[0, 1] = 8.5; chart1.XValue[0, 2] = 9.5; chart1.XValue[0, 3] = 15.5; chart1.Value[0, 0] = 5; chart1.Value[0, 1] = 10; chart1.Value[0, 2] = 8; chart1.Value[0, 3] = 30; Axis axis3 = chart1.Axis[2]; axis3.YAxis = false; // ??? axis3.Label[0] = "01/01/2000"; axis3.Label[1] = "01/02/2000"; axis3.Label[2] = "01/03/2000"; axis3.Label[3] = "01/04/2000"; chart1.CloseData(SoftwareFX.ChartFX.COD.Values); chart1.CloseData(SoftwareFX.ChartFX.COD.XValues); I'm using ChartFX for C#. Thanks ! Karin
  3. karin

    Mouse Event

    I want to use the function "MarkerShape" by clicking on the element of the graphic. I am activating Mouse Event like that: chart1.MouseClick += new MouseEventHandler(test_mouse); But nothing happens. What could it be wrong? thanks karin
×
×
  • Create New...