Jump to content
Software FX Community

jusim

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by jusim

  1. Hi,

    I use integer values for the X-axis and when I choose a line or a curve chart I don't have X-Axis labels well-displayed (see file attached). If values on this axis are "string" or "datetime" Labels are well displayed

    my code is:

    Chart.Data.Clear();

    Chart.DataSourceSettings.Fields.Clear();

    Chart.DataSourceSettings.Fields.Add(new FieldMap(points.Columns[0].ColumnName, FieldUsage.XValue));

    for (int i = 1; i < points.Columns.Count; ++i)

    {

    Chart.DataSourceSettings.Fields.Add(new FieldMap(points.Columns.ColumnName, ChartFX.WinForms.FieldUsage.Value));

    Chart.DataSourceSettings.Fields.DisplayName = points.Columns.Caption;

    }

    Chart.AxisX.Step = 1;Chart.AxisX.Staggered = true;

    Chart.DataSource = points;

    Thank you

     

  2. Hi,

    I have Datetime values on the X-Axis and not all labels are displayed (see file attached).

    My code:

    chart.Data.Clear();

    chart.DataSourceSettings.Fields.Clear();

    Type type = points.Columns[0].DataType;

    if (type == typeof(decimal) || type.IsPrimitive || type == typeof(DateTime)) // type = Datetimechart.DataSourceSettings.Fields.Add(new FieldMap(points.Columns[0].Caption, FieldUsage.XValue));

    elsechart.DataSourceSettings.Fields.Add(new FieldMap(points.Columns[0].Caption, FieldUsage.Label));

    for (int i = 1; i < points.Columns.Count; ++i)chart.DataSourceSettings.Fields.Add(new FieldMap(points.Columns.Caption, ChartFX.WinForms.FieldUsage.Value));

     

    chart.AxisX.LabelsFormat.Format = AxisFormat.Date;

    chart.DataSource = points;

     

    Sincerely

  3. Hi,

    For my business Object I use a class which implements this interface:

    public interface IGraphPoint<T1,T2>

    {

    string SerieName { get; }

    T1 XValue {

    get; }T2 YValue { get ; }

    }

    So I created a class Point which implements IGraphPoint :

    public

    class Point : IGraphPoint<double, double>

    { /* Implementation */ }

    and I initialise my chart using listDataProvider and CrossTabDataProvider:

    ListProvider l = new ListProvider(pointsList); // pointsList = List<Point>

    CrosstabDataProvider c = new CrosstabDataProvider();c.RowHeadingSettings = RowHeadingSettings.Auto;

    c.DataSource = l;

    Chart.DataSourceSettings.Fields.Add(new FieldMap("SerieName", FieldUsage.ColumnHeading));

    Chart.DataSourceSettings.Fields.Add(

    new FieldMap("XValue", FieldUsage.RowHeading));Chart.DataSourceSettings.Fields.Add(new FieldMap("YValue", FieldUsage.Value));

     

    Chart.DataSource = c;

     And my issue is when I set the RowHeadingSettings property of my crossTabDataProvider to "Auto", labels on the X-Axis are well displayed but not in ascending order and when I set the same property to "XValues" I don't have all X-Axis labels and sometimes the x-Axis label displayed is not the corresponding X value of the chart (Maybe I'm not very clear...).(see file attached)

    Can you help me?

    Thank you

     

     

  4. In fact, I use a string "Xml" not a file but it's the same.

    Code:

    xml = GetXmlChain();

    XmlDataProvider xmlDataProvider = new XmlDataProvider();

    xmlDataProvider.LoadXml(xml);

     

    int i = xmlDataProvider.Columns.Count;// i = 0??

    chart.DataSourceSettings.DataSource = xmlDataProvider;
  5. Hi,

    I have a problem with hidden points with a curve chart. I enabled the property "InterpolateHidden" and I have a blank with curve chart (see file attached) but with lines chart I don't have it. Maybe I made a mistake or forgot something, can you help me?

    Thank you

  6. hi,

    I bind my chart with an xml file and I need to get columns name in order to specify the property of each column.

    I use a XmlDataProvider and after loading my xml file I can't have any access to my columns name ( columns count = 0).

    Can you help me.

    Thank you

     
  7. hello,

    I want to bind a chart with my business object.

    I have a class:

    class

    MyData

    {

    string _serieName;

    object _xValue; double _yValue;public MyData(string serieName, object xvalue, double value)

    {

    _serieName = serieName; 

    _xValue = xvalue;

     

    _yValue = value;

    }

    public object XValue {get { return _xValue; } }

    public string SerieName { get { return _serieName; } }public double YValue {get { return _yValue; } }

    }

     xvalue is an object because I can have double values, datetime values or string values. I can have a chart but I want the axisX to be sorted in ascending order because when I try like that:

    MyData[] testArray = new MyData[3];

    testArray[0] =

    new MyData"serieA", 2, 12);testArray[1] = new MyData("SerieB", 1, 16);

    testArray[2] =

    new MyData("SerieC", 3, 15);ListProvider l = new ListProvider(testArray);CrosstabDataProvider c = new CrosstabDataProvider();

    c.DataSource = l;

    chart.DataSourceSettings.Fields.Add(

    new FieldMap("SerieName", FieldUsage.ColumnHeading));chart.DataSourceSettings.Fields.Add(new FieldMap("XValue", FieldUsage.RowHeading) );

    chart.DataSourceSettings.Fields.Add(

    new FieldMap("YValue", FieldUsage.Value));

    chart.DataSource = testArray;

    I have a good chart but labels on axisX are in this order : 2 - 1 - 3 (the order in the tab).

    I think it's a normal behaviour but is there a way to display a chart with axisX sorted?

    Thank you.

  8. hello,

    I have something strange: I have 5 series of 5 values ("Currency" around 8 or 9 figures), I use a BarChart(3D, cylinder) and when I display the datagrid with the option "Stacked" the datagrid displays a scrollbar and all values are well-readable. But if I choose "Stacked 100%" all columns in the datagrid are compressed, so the reading is difficult (numbers are cut). Can you help me?

    thank you.

×
×
  • Create New...