Jump to content
Software FX Community

Frank

Staff
  • Posts

    1,761
  • Joined

  • Last visited

Posts posted by Frank

  1. This is by design. For ChartFX 6.2, the assembly version is not changed in service packs. This was done to avoid problems with earlier versions of VS that will not pick-up the new dll if the assembly version was changed. We have changed this in version 7 whcih is compatible only with VS 2005 and later versions.

    For this and other reasons, Chart FX 6.2 should NOT be installed in the GAC.

  2. Yes. This is possible. The question is where do you want to display this total. Since you want to display the actual value and, in addition, the total value, you will have to decide where to display it as the space for the label will be already taken.

    Foe example, if you want the total, and then in the next line the value for the last bar you can do: 

    chart1.AllSeries.PointLabels.Visible =

    true;

    chart1.Series[chart1.Data.Series - 1].PointLabels.Format = "%T\n%v";

  3. 1) Try this:

     chart.AxisX.Style |= AxisStyle.FixRightAligned;

     Also, make sure there are no trailing spaces in the strings (labels) that come from your data.

     The flag AxisStyle.FixRightAligned is there to work around a bug measuring strings in GDI+. It may cuase the text to looked less smooth (more jagged).

    2) That one's easy:

    chart1.AxisX.Grids.Major.TickMark =

    TickMark.None;

     

  4. It seems that either at sesign-time or in some code not posted, you are setting the X-Axis step to a small number (not zero). If you want the step to automatically adjust to the available size, you must leave it as default (zero).

    If you think my assesment is incorrect, please post a sample program (stand-alone) that reproduces the problem.

  5. There is already a border around the Pie and around the boxes of the legend box, but it is more subtle than that use by Excel.

     If you want to fix the color of the border do:

     chart.AllSeries.Border.Effect = BorderEffect.None;

     chart.AllSeries.Border.Color = Color.Black;

     To get lines delimiting each slice:

    chart.AllSeries.Border.BeweenSegments = true;

     

    trackTrace.txt

  6. If you set "string" labels to the X-Axis to obtain P1,P2,etc. instead of setting X-Values, the Date logic will be lost and lables will become just string. Therefore the concept of Quaters, Moths, etc. will no longer apply.

    You can choose to keep the Dates as X-Values and then, at the time of rendering translate the Date to be displayed to the format you need "P1","P2", etc. You can do this using the GetLabel event.

    Please check the docs. for more info.

  7. There are two problems with this code:

    1) If you supply Y-From, you need to do so for all series.

    2) The Y-From values must precede the series' Value.

     So the code should look something like this (assuming you wanted the From values to be applied to the Area Series):

    List<object> allArrays = new List<object>();

    allArrays.Add(

    new double[] { 446, 113, 7, 344 });allArrays.Add(new double[] { 2, 4, 7, 12 });

    allArrays.Add(

    new double[] { 100, 45, 1, 44 });allArrays.Add(new double[] { 546, 213, 12, 444 });

    allArrays.Add(

    new double[] { 2, 4, 7, 12 });allArrays.Add(new double[] { 0, 0, 0, 0 });

    Chart1.AllSeries.Gallery =

    Gallery.Bar;AxisY y0 = Chart1.Panes[0].Axes[0];AxisY y1 = new AxisY();

    Chart1.Panes[0].Axes.Add(y1);

    Chart1.Series.Add(

    new SeriesAttributes());Chart1.Series.Add(new SeriesAttributes());

    Chart1.Series[0].AxisY = y0;

    Chart1.Series[1].AxisY = y1;

    Chart1.Series[0].Pane = Chart1.Panes[0];

    Chart1.Series[1].Pane = Chart1.Panes[0];

    Chart1.Series[0].Text =
    "Bar";

    Chart1.Series[1].Text =

    "Area";Chart1.Series[0].Gallery = Gallery.Bar;

    Chart1.Series[1].Gallery =

    Gallery.Area;FieldMap fieldMap1 = new FieldMap();

    fieldMap1.Name =

    "Field1";fieldMap1.Usage = FieldUsage.Value;

    FieldMap fieldMap2 = new FieldMap();fieldMap2.Name = "Field2";

    fieldMap2.Usage =

    FieldUsage.XValue;FieldMap fieldMap3 = new FieldMap();

    fieldMap3.Name =

    "Field3";fieldMap3.Usage = FieldUsage.FromValue;

    FieldMap fieldMap4 = new FieldMap();fieldMap4.Name = "Field4";

    fieldMap4.Usage =

    FieldUsage.Value;FieldMap fieldMap5 = new FieldMap();

    fieldMap5.Name =

    "Field5";fieldMap5.Usage = FieldUsage.XValue;

    FieldMap fieldMap6 = new FieldMap();fieldMap6.Name = "Field6";fieldMap6.Usage = FieldUsage.FromValue;

    Chart1.DataSourceSettings.Fields.Clear();

    Chart1.DataSourceSettings.Fields.Add(fieldMap6);  // From values for first series (Bar)

    Chart1.DataSourceSettings.Fields.Add(fieldMap1);

    Chart1.DataSourceSettings.Fields.Add(fieldMap2);

    Chart1.DataSourceSettings.Fields.Add(fieldMap3);  // From values for second series (Area)

    Chart1.DataSourceSettings.Fields.Add(fieldMap4);

    Chart1.DataSourceSettings.Fields.Add(fieldMap5);

    ListProvider DataProvider = new ListProvider(allArrays);

    Chart1.DataSource = DataProvider;

  8. There are two problems with this code:

    1) If you supply Y-From, you need to do so for all series.

    2) The Y-From values must precede the series' Value.

     So the code should look something like this (assuming you wanted the From values to be applied to the Area Series):

    List<object> allArrays = new List<object>();

    allArrays.Add(

    new double[] { 446, 113, 7, 344 });allArrays.Add(new double[] { 2, 4, 7, 12 });

    allArrays.Add(

    new double[] { 100, 45, 1, 44 });allArrays.Add(new double[] { 546, 213, 12, 444 });

    allArrays.Add(

    new double[] { 2, 4, 7, 12 });allArrays.Add(new double[] { 0, 0, 0, 0 });

    Chart1.AllSeries.Gallery =

    Gallery.Bar;AxisY y0 = Chart1.Panes[0].Axes[0];AxisY y1 = new AxisY();

    Chart1.Panes[0].Axes.Add(y1);

    Chart1.Series.Add(

    new SeriesAttributes());Chart1.Series.Add(new SeriesAttributes());

    Chart1.Series[0].AxisY = y0;

    Chart1.Series[1].AxisY = y1;

    Chart1.Series[0].Pane = Chart1.Panes[0];

    Chart1.Series[1].Pane = Chart1.Panes[0];

    Chart1.Series[0].Text =
    "Bar";

    Chart1.Series[1].Text =

    "Area";Chart1.Series[0].Gallery = Gallery.Bar;

    Chart1.Series[1].Gallery =

    Gallery.Area;FieldMap fieldMap1 = new FieldMap();

    fieldMap1.Name =

    "Field1";fieldMap1.Usage = FieldUsage.Value;

    FieldMap fieldMap2 = new FieldMap();fieldMap2.Name = "Field2";

    fieldMap2.Usage =

    FieldUsage.XValue;FieldMap fieldMap3 = new FieldMap();

    fieldMap3.Name =

    "Field3";fieldMap3.Usage = FieldUsage.FromValue;

    FieldMap fieldMap4 = new FieldMap();fieldMap4.Name = "Field4";

    fieldMap4.Usage =

    FieldUsage.Value;FieldMap fieldMap5 = new FieldMap();

    fieldMap5.Name =

    "Field5";fieldMap5.Usage = FieldUsage.XValue;

    FieldMap fieldMap6 = new FieldMap();fieldMap6.Name = "Field6";fieldMap6.Usage = FieldUsage.FromValue;

    Chart1.DataSourceSettings.Fields.Clear();

    Chart1.DataSourceSettings.Fields.Add(fieldMap6);  // From values for first series (Bar)

    Chart1.DataSourceSettings.Fields.Add(fieldMap1);

    Chart1.DataSourceSettings.Fields.Add(fieldMap2);

    Chart1.DataSourceSettings.Fields.Add(fieldMap3);  // From values for second series (Area)

    Chart1.DataSourceSettings.Fields.Add(fieldMap4);

    Chart1.DataSourceSettings.Fields.Add(fieldMap5);

    ListProvider DataProvider = new ListProvider(allArrays);

    Chart1.DataSource = DataProvider;

    Code.txt

×
×
  • Create New...