Jump to content
Software FX Community

Xiaonan Ji

Members
  • Posts

    9
  • Joined

  • Last visited

Xiaonan Ji's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. What do you mean XY Char? If it is a type of chart in Chart FX, do you mean that if I use that chart, Chart FX engine can draw lines correctly in zoomed area? I am using XY chart in my understanding but lines are still missed. By the way, curves don't have this problem. Unfortunately, I can use curves to replace lines in my case. Interestingly, lines extend beyond the left of the chart can be drawn correctly. It seems to me that, if the starting point of the line is outside the zoomed area, the line can still be drawn, but if the ending point of the line is outside the zoomed area, the line is missed. Am I right on this point? If so, I more likely to think this is a bug. Thank you very much. Regards Xiaonan Ji
  2. In your Resource Center I learn that ChartFX supports 9 different area charts, including Area, CurveArea, 2D and 3D styles. In one of the example, the Area graph is not started from the bottom of the x axis. This gives a shape of a band. But this example is only for Area, whose edges are lines. You also have an example of CurveArea, whose edges are curves rather than lines. But there is no example showing that drawing a curve area with a shape as band is possible or not. By doing this obviously you need to set the FromY property so ChartFX knows where in y axis should the area start. So I guess I should ask the question as: do ChartFX support drawning curve areas with FromY property? Or curve areas must start from the bottom of the chart, with FromY = min y values? It will be great if I can do this. I checked that for Area, you can do it. If you are not sure what I am asking for, please go to ChartFX Resource Center, choose Programmer's Guide & Samples option, go to ChartFX Programmer's Guide -> Gallery Types -> Area in the tree view. This page should be titled Area Charts and has 9 areas pics. The middle one is what I want, but it is for Gallery.Area. The one below it is for Gallery.CurveArea, but the area starts from y = 0. Is it possible to draw the middle pics' shape with CurveArea? That's my question. Thank you very much for the help. Xiaonan
  3. I have some charts which have lines defined by pairs of points. When I zoom in the chart, if the zoomed area excludes one of the points for a line, that line is not drawn. In other words, to show a line, it must be the case that both of the points are included in the chart area, otherwise the line is not drawn. I don't think this is the correct behavior for zooming. Zooming should only magnify part of the chart without removing or adding anything. So the correction should be, even if one point or both of the points are outside the zoomed area, the line should still be drawn. Does ChartFX supports this? How can I enable this behavior for ChartFX if it supports. If it doesn't support this, any workarounds? FYI, the version of my ChartFX is 7.0.2664.18481. Many thanks. Xiaonan Ji
  4. For simplicity reason, I just attach a small piece of code as following: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace ChartFXPractice{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { chart1.Data.Series = 2; chart1.Data.Points = 5; Dictionary<int, int> line1 = new Dictionary<int, int>(); line1.Add(1, 3); line1.Add(3, 4); line1.Add(5, 22); line1.Add(12, 32); line1.Add(33, 4); Dictionary<int, int> line2 = new Dictionary<int, int>(); line2.Add(1, 3); line2.Add(3,5); line2.Add(5, 8); line2.Add(12,13); line2.Add(33,44); chart1.Data.X.Shared = true; int p = 0; foreach (KeyValuePair<int, int> pair in line1) { chart1.Data.X[0, p] = pair.Key; chart1.Data.Y[0, p] = pair.Value; p++; } p = 0; foreach (KeyValuePair<int, int> pair in line2) { //chart1.Data.X[1, p] = pair.Key; chart1.Data.Y[1, p] = pair.Value; p++; } chart1.ToolBar.Visible = true; } }} There are two series, with same number of points, with same x-values. So I only set the x-values for the first series but comment out the setting of x-values for the second series. And I set the Shared property to true at the beginning. But in the clipboard output, I get: 1 3 1 33 4 3 55 22 5 812 32 12 1333 4 33 44 What I expect is: 1 3 33 4 55 22 812 32 1333 4 44 Thanks.
  5. OK, I figured out the decimal output problem was that I didn't set the format for the axis. Now it is OK. I tried to set x-values for points in the first series. Since the upper bound of the confidence bound (series 3) should have a YFrom set to be the lower bound of the confidence bound (series 2), I set YFrom for points of series 3. This seems to me should not affect the share of the x-values and I tracked that the shared property remains true. But in the clipboard, it exported multiple columns. But when I remove the setting of YFrom for points of series 3, there is only one x-value column in the output. Thanks.
  6. If I set chart.Data.X.Shared to false and set for each point both X and Y values, the output to clipboard will have only one column for x-values instead. So shall I set Shared to false or true to get only one X-values column? A bit confusing.
  7. I made sure chart.Data.X.Shared is always true and I only set X-values for the first series but the output still has multiple x-value columns. Another interesting thing is, the x-values are two-digit decimals but the copy out text has one-digit decimals instead. So a x-value of 0.75 is output as 0.8. In the chart, the x-axis labels(automatically generated by chart fx) are also one-digit decimals. In chart it is totally OK but once the text values are output, 0.8 can be misleading. Sorry for these following-up questions. Many thanks
  8. Yes, it seems that this works for me. I set currentChart.ExtraStyle = currentChart.ExtraStyle | ChartStyles.ExportXValues; and it gives me the x-values. In the graph, I have three series, with the same number of points on each series. The points in the same position on series have the same x-value. By using the above method, in the clipboard, for each serie, it produces a column of x-values. That is, three columns of the same set of x-values. Any way to let it only produce one single set of x-values? The final result should be similar to using labels. That is, if using labels, only one column of labels is output as the first column. Many thanks for the first solution and looking forward for the second one. Regards Xiaonan
  9. Icame across a problem of exporting the text-only information of thechart to clipboard.The application has several two dimensional points. I use the following way to set the points in the chart://Get X Axis,Axis xAxis;//Get Y Axis,Axis yAxis;foreach(point p in pointList){ xAxis[seriseNo, pointNo] = point.X; yAxis[seriseNo, pointNo] = point.Y;}Ididn't manually assign any labels to x axis since the points were notevenly distributed on x axis. In this case, labels on x axis wereautomally generated.When I tried to copy the text of the chart to clipboard, it didn'toutput the points' x-axis values. That is, in the output, there wasonly one column about points' y-axis values.If I manually setthe x-axis labels for each point in another case, in the text-output,x-axis values were included. That is, there were two columns forpoints' x-axis and y-axis values.My question is, if I don't manually assign any x-axis labels, isthere a way to output points' x-axis values as well? Any relaventsolution is welcomed as well.
×
×
  • Create New...