Jump to content
Software FX Community

AndreG

Staff
  • Posts

    333
  • Joined

  • Last visited

Everything posted by AndreG

  1. Have you tried using the volume property of the PointAttributes class? It controls the percentage of total space each bar takes. chart1.AllSeries.Volume = 20;
  2. I made you a little project from what i understand about your requirements. If not what you were looking for, it should get u headed the right way.
  3. I still do not see how that is different from the sample I posted (except for different values on the max and min of each axis). Have you tried that? Do you have a mock screenshot of what you are trying to achieve?
  4. Unlike other charts, the pie chart does not display one legend item per series. Since each slice on a pie represents a point, it makes more sense to display one item per point. Try the following. chart1.LegendBox.ItemAttributes[chart1.AxisX].Visible = false;
  5. Replied at: http://community.softwarefx.com/forums/p/10449/25305.aspx#25305
  6. Here is what you are missing. chart1.LegendBox.ItemAttributes[chart1.Series].Visible = false;
  7. Not sure what you mean. Bubble charts work the same as other charts, supporting negative as well as positive values. chart1.Gallery = Gallery.Bubble;chart1.Data.Series = 2;chart1.Data.Points = 4;chart1.Data.Y[0, 0] = 10;chart1.Data.Y[0, 1] = -10;chart1.Data.Y[0, 2] = -10;chart1.Data.Y[0, 3] = 10;chart1.Data.X[0, 0] = 10;chart1.Data.X[0, 1] = 10;chart1.Data.X[0, 2] = -10;chart1.Data.X[0, 3] = -10;chart1.Data.Y[1, 0] = 10;chart1.Data.Y[1, 1] = 10;chart1.Data.Y[1, 2] = 10;chart1.Data.Y[1, 3] = 10;chart1.AxisX.Max = 15;chart1.AxisX.Min = -15;chart1.AxisY.Max = 15;chart1.AxisY.Min = -15;
  8. Its a little different on the financial extension, but I got something working. Attached.
  9. Try this: Chart1.Series[0].Color = System.Drawing.ColorTranslator.FromHtml("#508E21");
  10. The code bellow will generate the attached chart. I hope it is what you are looking for. Dim nSeries As Integer Dim nPoints As Integer Dim i As Integer Dim j As Integer nSeries = 4 nPoints = 5 i = 0 Chart1.OpenData COD_Values, nSeries, nPoints Do While (i < nSeries) j = 0 Do While (j < nPoints) Chart1.Value(i, j) = (Rnd()) * 100 j = j + 1 Loop i = i + 1 Loop Chart1.CloseData COD_Values Chart1.Series(0).Stacked = True Chart1.Series(1).Stacked = True Chart1.Series(2).Stacked = False Chart1.Series(3).Stacked = True Chart1.AxisY.Max = 200
  11. There seems to be an issue with that specific gallery, thank you for bringing that to our attention. I have reported as a bug, I will post the results on this thread.
  12. Yes. All you need to do is add 4 more series to the chart.
  13. I am currently not running the Release Candidate myself, so I would not know. I am sure you can find the answer out there. Let us know if the product will work with after you figured out compatibility mode.
  14. Will it run on Windows 7 if you use XP mode?
  15. You could change your axis to be categorical instead of numerica. But then every point will be plotted with the same distance between them. So unless your data comes on a fixed period anyways, i can see how that would not work. The other way would be to implement the dragging yourself. You can use the mouse events, then when the click happens in one point you could use the PointToPixel and PixelToPoint methods. That way, using the pixel information you get on the mouse move event you can calculate the point information to pass the marker. Let me know if it makes sense.
  16. I might have found something that could help you. There is a property in the Axis class called MaxSizePercentage. It will limit the space taken by the axis as a percentage, but in a brute way. It will clip the begining of the string. To avoid that you could force the clipping of the end of the string using LabelTrimming. Chart1.AxisX.MaxSizePercentage = 30;Chart1.AxisX.LabelTrimming = System.Drawing.StringTrimming.EllipsisWord;
  17. Ooops. Someone posted a similar question to the 7.0 Web forums and I replied to the wrong one... Sorry! But yes, I hope my solution works for you as well. Let us know.
  18. Edit: A little better results, less code. Forgot about the LabelTrimming property... Chart1.AxisX.MaxSizePercentage = 30; Chart1.AxisX.LabelTrimming = System.Drawing.StringTrimming.EllipsisWord; I might have found something that could help you. There is a property in the Axis class called MaxSizePercentage. It will limit the space taken by the axis as a percentage, but in a brute way. It will clip the begining of the string. To avoid that you could force the clipping of the end of the string, using the GetAxisLabel event. Make sure you turn on Notify for the Axis. Chart1.AxisX.MaxSizePercentage = 30; Chart1.AxisX.Notify = true; Chart1.GetAxisLabel += new AxisLabelEventHandler(Chart1_GetAxisLabel); And... protected void Chart1_GetAxisLabel(object sender, AxisLabelEventArgs e) { if (e.Axis == Chart1.AxisX) { if (e.Text.Length > 13) { e.Text = e.Text.Substring(0, 10) + "..."; } } }
  19. I have also made the necessary changes to the online version of the Programmer's Guide. http://support.softwarefx.com/SupportDocTree.aspx?Prod=CfxWPF&Type=P Please take a look and let me know if it is well explained now. ChartFxTest.zip
  20. Thank you for pointing this out to us. I have noticed the gaffe and worked on a better version of that specific part of the Resource Center. It will be available for the public on the next Service Pack release. In case you would like to manually update your Resource Center, please contact support [at] softwarefx.com and they will be able to send you just the necessary files. Once again thanks for the feedback. Should you run into any issues like that again, please be sure to let us know.
  21. Great! Glad I could help. GalleryCombination(2).zip
  22. Not sure why you are using crosstab there. Or why you set 2 different FieldUsages to one field. Take a look at the Resource Center, it explains on which cases to use the crosstab. Try the following. // Code to generate Bar Chart Chart1.RenderFormat = ".NET"; Chart1.Height = Unit.Percentage(99); Chart1.Width = Unit.Percentage(100); Chart1.Gallery = Gallery.Bar; Chart1.View3D.Enabled = true; Chart1.View3D.BoxThickness = 10; Chart1.AxisX.LabelsFormat.Format = AxisFormat.Number; Chart1.AxisX.Title.Text = "X"; Chart1.AxisY.Title.Text = "Y"; DataTableProvider data = new ChartFX.WebForms.DataProviders.DataTableProvider(dt); Chart1.DataSourceSettings.Fields.Add(new FieldMap("X", FieldUsage.Label)); Chart1.DataSourceSettings.Fields.Add(new FieldMap("Y", FieldUsage.Value)); Chart1.DataSource = data; //Chart1.RecalculateScale(); No need for this
  23. I wouldn't think this is a Chart FX bug. Haven't looked at that sample in a while, but I believe there is more to setting the series to the secondary axis than the code you have posted. It seems you will have to re-write other parts of the sample as well.
  24. I have never seen that before. Do you think you could post some sample code to help me reproduce that scenario? ChartFX_Chart.zip
  25. There is a sample that comes with CFX called BubbleCharts. It uses the GetPointLabel event to set each pointlabel. Have you taken a look at that? C:\Program Files\Chart FX 7\Help and Samples\Sample Applications\Windows Forms\VS2008\BubbleCharts
×
×
  • Create New...