Jump to content
Software FX Community

maximop

Members
  • Posts

    229
  • Joined

  • Last visited

Everything posted by maximop

  1. The equivalent in ChartFX .NET 6.2 is ConstantLine. You can find a sample code in the Samples & Resource Center which is installed with your product; however, for your convenience, I am pasting the code snippet here: SoftwareFX.ChartFX.Internet.Server.ConstantLine constantLine = chart1.ConstantLines[0]; constantLine.Value = 30; constantLine.Color = System.Drawing.Color.Red; constantLine.Axis = SoftwareFX.ChartFX.AxisItem.Y; constantLine.Text = "Alarm Limit 1"; constantLine.Width = 1; constantLine.Style = System.Drawing.Drawing2D.DashStyle.Dash; constantLine = chart1.ConstantLines[1]; constantLine.Value = 3; constantLine.Color = System.Drawing.Color.Orange; constantLine.Axis = SoftwareFX.ChartFX.AxisItem.X; constantLine.Text = "Limit 2"; constantLine.Width = 3; chart1.Gallery =SoftwareFX.ChartFX.Gallery.Curve; chart1.MarkerShape = SoftwareFX.ChartFX.MarkerShape.None;
  2. You currently have the Chart1.AxisX.Step property set to show the XValues every two years; since you are starting on 1964, the last year shown based on your settings will be 2006. Try adjusting the Step property to show all years instead.
  3. Is PSS running as an application on IIS and able to execute scripts only? What about the permission settings for the ChartFX70 Virtual Folder? You need to have read/write permissions. What exactly do you see when PSS is running? How are you rendering the chart? Image or .NET? Below, please find some links regarding PSS: Troubleshooting the PSS Service: http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/762/2/021.htm Disabling the PSS Service: http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/762/1/010.htm The ChartFX PSS Service in a nutshell: http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/762/1/004.htm
  4. Make sure that before reinstalling the product the ChartFX installation folder was removed from the Program Files folder; otherwise, remove it. If this folder is still present, ChartFX will not overwrite the existing binaries. Why are you trying to downgrade anyways? Are you having any problems?
  5. Which free version are you using? ChartFX Lite for .NET? If so, please note that this version of ChartFX is very limited and as you already know, does not have all of the features that the full version has. I recommend you download a trial for ChartFX for Visual Studio 2005 if you're actually intending to use this product. In your version of ChartFX, the Axis Class exposes the LabelsFormat Property, and the ValueFormat Class exposes both the Format and the CustomFormat properties, respectively. Unfortunately, in this version of ChartFX, the Format Enumerator only has values for None, Number, and Currency.
  6. In order to render the chart to flash format, you first need to reference in your project the ChartFX.Writer.Flash.dll. In the code, you can simply do the following: Chart1.OutputWriter = new SoftwareFX.ChartFX.Flash.FlashWriter();
  7. You need to set the LabelsFormat and DataFormat properties, respectively. The LabelsFormat property of the x-axis is exposed in both design-time and code-behind but the DataFormat property is only exposed in the code. You can programmatically set this as follows: chart1.AxisX.DataFormat.Format = AxisFormat.Time; chart1.AxisX.DataFormat.CustomFormat = "HH:mm";chart1.AxisX.LabelsFormat.Format = AxisFormat.Time; chart1.AxisX.LabelsFormat.CustomFormat = "HH:mm";
  8. Unfortunately, we currently don't have any plans for developing ChartFX for Windows Mobile 5.0 Pocket PC. The only product that we have, as Marie outlined, is Chartfx for .NET 6.2 which includes Pocket ChartFX for Visual Studio 2003.
  9. I am unable to replicate your issue on case 1. The first column is properly set to XValues on the chart. Please note that you always need to set the FieldMaps before binding the data to the chart control. You can do the following: Chart1.DataSourceSettings.Fields.Add(new FieldMap("MyX", FieldUsage.XValue)); Chart1.DataSourceSettings.Fields.Add(new FieldMap("MyY", FieldUsage.Value)); Chart1.DataSource = dt; In regards to case 2, please note that XValues can only be a number or a date. If you are going to be using strings, you will need to be setting the FieldUsage to Label instead. This will also work well if the first column also contains numbers and you are don't know if you will be passing a numeric value or a string, as you already noted.
  10. maximop

    Bar charts

    You can set the Color property of each individual series as follows: chart1.Series[0].Color = System.Drawing.Color.Blue; chart1.Series[1].Color = System.Drawing. Color.Green;
  11. maximop

    Link

    The axis labels do not expose a Link property. You can set the Link property as you already did, or you can add axis sections which expose such functionality.
  12. maximop

    Resize

    I am unable to replicate this problem. Increasing/decreasing the chart's height repaints the chart as expected. How are you resizing the control @ runtime? After you resize the chart, try calling the Chart1.UpdateSizeNow function.
  13. You cannot move the axis label inside of the chart; you can, however, rotate them around their position. If you need labels inside the chart and along the axis, I recommend you use annotations for this.
  14. The labeling of the axis will depend on the scale that you are setting. If you have a y-axis from 0-100 with a step of 10, then labeling the axis can be done as follows: chart1.AxisY.Labels[0] = "Label 1"; chart1.AxisY.Labels[8] = "Label 2";chart1.AxisY.Labels[16] = "Label 3";
  15. I am unable to replicate this problem. The UserCommand gets fired as expected. Please make sure that the .NET Framework Trust is set to "Full Trust" for My Computer, Intranet, and Trusted Sites. Also, make sure that your Internet Browser is allowed to execute JavaScript code. Below is the code I used: Server-side code: Chart1.ToolBar.Visible = TrueChart1.RenderFormat = ".NET"Dim cmd As Command cmd = New Command(1) cmd.Text = "Test Command"Chart1.Commands.Add(cmd) Chart1.ToolBar.Insert(0, New ToolBarItem(1))Client-side code: < script language="javascript" for="Chart1" event="UserCommand(obj,args)">alert("Test Command Fired!"); </script>
  16. Sorry for the confusion. What you need to do in order to show the Tooltip with the actual DateTime value, is to set the Text property for each data point (Pie slice) with the conversion of the DateTime value, and then set the ToolTipFormat property of the chart with the %L variable setting which exposes the value of the Points.Text property. You can do the following: chart1.Points[0, 0].Text = DateTime.FromOADate(chart1.Data[0, 0]).ToShortDateString(); chart1.Points[0, 1].Text = DateTime.FromOADate(chart1.Data[0, 1]).ToShortDateString();chart1.Points[0, 2].Text = DateTime.FromOADate(chart1.Data[0, 2]).ToShortDateString(); chart1.ToolTipFormat = "%L";Hope this helps.
  17. Why are you trying to implement the OnClick Event? If you added a custom command to the chart, you need to implement the UserCommand Event instead. In regards to the image, how are you adding this image? Can you provide some code showing this?
  18. Unfortunately, the only things you can set programatically are the visual attributes of the cells.
  19. You need to check when you are doing a PostBack. You can do the following to avoid re-adding those elements: if (!Page.IsPostBack) { Chart1.Titles.Add(new TitleDockable("This is a title test")); Chart1.Titles[0].Font = new Font("Arial", 12, FontStyle.Bold);//Rest of code }
  20. The DataChangedByUser will get fired once the chart updates the new data. It does not make sense to fire the event when the cells are in edit mode because in this mode, the chart is still showing the current data. In regards to your question, unfortunately, there is no method/property that can be set to determine when a cell has finished editing.
  21. The charts will only plot numerical data. If you are trying to plot DateTime values as the value contained within a Pie Slice, this is not possible. If you pass a DateTime value to the chart, this will be interpreted by its double value representation and that is what's going to be plotted. Additionally, Pie Charts do not use an axis to plot its data.
  22. The AxisX and AxisY Objects expose a DataFormat and LabelsFormat property; you can set them in the following way: chart1.AxisX.DataFormat.Format = AxisFormat.DateTime; chart1.AxisX.DataFormat.CustomFormat = "HH:mm:ss";chart1.AxisX.LabelsFormat.Format = AxisFormat.DateTime; chart1.AxisX.LabelsFormat.CustomFormat = "HH:mm:ss";
  23. The ChartFX Printer Class provides important and very helpful properties to print the chart. Using the supported members, you will have control over the margins, paper orientation, color or pattern printing, among others. The supported methods will also allow you to prompt the user with page setup, preview, and print dialogs to ensure the user prints exactly what they want; however, this is more of an extended functionality of the PrintDocument Class provided by the .NET Framework. When you print, you still have to create a PrintDocument Object which is handled by the BeginPrint, PrintPage, and EndPrint Events respectively. If you want to manipulate how a page is printed, you will need to do this in the PrintPage Event. Again, this is beyond the scope of ChartFX; however, I will post some code that can help you accomplish what you need. The code snippet is below: private void Form1_Load(object sender, EventArgs e) { printCover = true; // Global flag to control how to print the pages PrintDocument pd = new PrintDocument();pd.PrintPage += new PrintPageEventHandler(pd_PrintPage); pd.Print(); } void pd_PrintPage(object sender, PrintPageEventArgs e) { if (printCover) { e.Graphics.DrawString("This is my cover sheet", new Font("Arial", 14, FontStyle.Bold), Brushes.Black, 25, 25, StringFormat.GenericTypographic); printCover = false;e.HasMorePages = true; // Forces an additional page to be printedreturn ;} else{ chart1.Paint(e.Graphics, new Rectangle(25, 25, e.MarginBounds.Width, e.MarginBounds.Height / 2), PaintStyles.Print); } } The main part of the code is the PrintPage Event which determines how my document is going to be printed. I am using a flag that helps print a first page before printing the chart image. The HasMorePages property, tells the Event Handler that there are more pages to be printed; in this case, we need to print the chart. Hope this helps with what you need.
  24. ChartFX only plots numerical data. You can, however, pass DateTime values as XValues. ChartFX treats XValues as the value to be used as the x-axis coordinate. Use this option if you are creating an XY Plot.
  25. There is no property that will allow you to do this; however, you can do the following to get an Area Chart without fill color and just a border color: Chart1.BorderEffect = BorderEffect_None Chart1.BorderColor = RGB(0, 200, 0) Chart1.Series(0).Color = RGB(255, 255, 255) Chart1.Series(1).Color = RGB(255, 255, 255) Although the BorderEffect and BorderColor properties are exposed in the Series Attributes Collection, setting them from the series' will show the major gridlines which is probably something you don't want; this in term will only give you a chart with the same border color for all series.
×
×
  • Create New...