Jump to content
Software FX Community

RandyJ

Members
  • Posts

    126
  • Joined

  • Last visited

Everything posted by RandyJ

  1. Hi,The annotation extension provides independent events including MouseDown, you must attach to these events in order to be notified when clicks are madein the annotation objects.For example, if you have:Annotations annots = new Annotations();chart1.Extensions.Add(annots); you can attach to the event by doing:annotX.MouseDown += new MouseEventHandler(AnnotationMouseDown);and then you need to define the corresponding event handler:private void AnnotationMouseDown (object sender, MouseEventArgs e){ // Your Mouse Down event code goes here. You can use the HitTest method to retrieve the object being hit.}Regards,RandyJ
  2. Hi, In order to capture these coordinates you can use the UserZooming event which occurs after the user releases the zooming area selector and right before the chart is actually zoomed. This event will provide you (as event arguments) with the new Pixel coordinates of the chart. If you want to get the point coordinates (not pixel coordinates), you can use the PixelToValue method of the Axis class which converts a position in pixels in the chart area to its representation on the respective axis. A couple of things about Client-Side events: - UseClientLoader must be set to false - You must have Full Trust in your .NET permissions (Client Computer - .NET Framework 2.0 Configuration) in order for the client to send events to JavaScript. Take a look at the following sample:<script lang="JavaScript" for="Chart1" event="UserZooming(sender,args)"> alert('Pixel Coordinates: \n\nX1: ' + args.X1 +' and X2: '+ args.X2+ "\n" + 'Y1: ' + args.Y1 + ' and Y2: ' + args.Y2); var chx = document.getElementById("Chart1"); var x1 = chx.AxisX.PixelToValue(args.X1); var x2 = chx.AxisX.PixelToValue(args.X2); var y1 = chx.AxisY.PixelToValue(args.Y1); var y2 = chx.AxisY.PixelToValue(args.Y2); alert('Point Coordinates: \n\nX1: ' + x1 + ' and X2: ' + x2 + "\n" + 'Y1: ' + y1 + ' and Y2: ' + y2); </script> <form id="form1" runat="server"> <div> <chartfx7:Chart ID="Chart1" runat="server" RenderFormat=".Net" UseClientLoader="false" Width="729px"> <Series> <chartfx7:SeriesAttributes></chartfx7:SeriesAttributes> <chartfx7:SeriesAttributes></chartfx7:SeriesAttributes> <chartfx7:SeriesAttributes></chartfx7:SeriesAttributes> </Series> </chartfx7:Chart> </div> </form> </body> </html> Let me know if this is what you want to do. Hopefully this sample will help you. Regards, RandyJ
  3. Hi, Are you using the Webforms version of the product? Have you dropped a chart control directly from the toolbox onto a form? If so, this library should have been added automatically. If not, try adding it manually. The one you need to add is: ChartFX.WebForms.Adornments.dll In order to specify a color for the plot area, you can set it as follows: Chart1.PlotAreaColor = Drawing.Color.Red Regards, RandyJ
  4. Hi, I am afraid this behavior is not supported. However I kindly invite you to send us an email to support at softwarefx dot com so that this can be considered as a new feature for future versions. Regards, RandyJ
  5. Hi, An image (or any other file) can be attached by selecting Reply -> Options -> File attachment -> Add/Update Regards, RandyJ
  6. Hi, In Chart FX 5.x, you can delete a constant line from the chart just by making it invisible. For the look of the chart I'm assuming you are using Chart FX 5.x, the code to hide a constant line is: ChartFX1.ConstantLine(0).Style = ChartFX1.ConstantLine(0).Style Or CC_HIDE ChartFX1.Refresh Regards, RandyJ
  7. Hi, That would not be possible. You may end up having two or more Y values for the same X value in the same series and that is not supported. In a bar chart, this behavior can be achieved by adding another series to the chart, so that a second point can have the same X value but in a different series. However in a bubble chart, Chart FX uses two series of data to create it. The first series passed to the chart is used for the actual point values (Y Values), while the second series is used to control the size of the bubble marker. Regards, RandyJ
  8. Hi, The ToolTipFormat property allows to control the information to be displayed in the tooltip when the user moves the mouse over a particular data point in the chart. If you specify the "L" parameter (see sample below), the tooltip will show the text property of the Point: Chart1.ToolTipFormat = "%L" ; Chart1.Points[0, 0].Text = "Custom Text" ; The same applies for the pointlabels theirselves. If you want the pointlabels to show the text value of the point, you need to set the pointLabels format as follows: Chart1.AllSeries.PointLabels.Format = "%L"; Chart1.Points[0, 0].Text = "Custom Text"; Regards, RandyJ
  9. Hi, Chart FX automatically reduces the bubbles' size so that they can fit in the plot area. Otherwise, some bubbles would be missing or may overlap. What you can do in this case is enable scrolling in the chart so that you can scroll to the left or right in order to see all the bubbles, and they will not shrink. Regards, RandyJ
  10. Hi, There are three ways to update the data that comes from a sql query. When you write the SQL statement, you can use specific parameters by using the
  11. Hi, 1)I want to print the chart from browser. What are the options available? Do u have samples? I tried searching ur API but did not find any.appreciate if someone could copy paste code here.The chart's printer object expose the following public methodspublic void Print ()public void Print (int fromPage, int toPage)public DialogResult PrintDialog ()public DialogResult PrintDialog (bool fromTo)public DialogResult PrintPreview ()Note that to minimize footprint and/or WinForms dependencies these methods are not present in our server component, since you do not want to the chart to be printed in your data center.In your case you have to script the client control (so you will need full trust), in the client control you will have access to all the previously mentioned methods. You don't have to modify the way you are currently building your ASPX pages, all you have to do is add code to script/handle events on the client. Please check a sample in our support site, under Miscellaneous named "Events - Get Tip". Note that scripting a .net control in the browser requires full trust.2) If the chart is rendered as images, there will be huge demand on client disk space. Is there a way to delete the images programmatically? While newer versions of Chart FX (Chart FX 7) have a mechanism to avoid a backlog of temporary files, Chart FX for .Net 6.2 does not automatically clean temporary files from disk. You will need to schedule a task that deletes files form that folder periodically. In the Util folder of your Chart FX installation, you should find the sfxremove.exe tool which lets you remove files older than any time span. You can simply schedule this app to run at your convenience or you can use your own batch file in order to remove the files. 3) What are the other options of rendering other than image? As a server control, Chart FX supports a method called GetHtmlTag that allows the developer to select, among other things, the type of desired output for your charts. By default, Chart FX will generate a PNG image of the chart, yet you may configure the getHtmlTag method or the HtmlTag property to the desired format. Among the options, Chart FX can generate the following chart formats: - ActiveX- .NET- PNG- JPEG- SVG- Flash By default, Chart FX will generate an image. By setting the third parameter to "Auto", Chart FX will generate the most interactive format depending on the User Agent of the browser requesting the chart. If the browser is Internet Explorer with the .NET Framework installed, Chart FX will generate a .NET component. If the browser is Internet Explorer 4 or above, without the .NET Framework, an ActiveX will be generated. For the rest of the browsers an image will be generated in Png or Jpeg format, depending on the browser's capabilities. Regards, RandyJ
  12. Hi, We need to reproduce the issue on our side. Please send us an email to support at softwarefx dot com and include a compilable sample that replicates the issue and shows how you export and import the chart. Regards, RandyJ
  13. RandyJ

    3D Pie

    Hi,Simply rotate the Pie Chart by changing the XAngle property. The pie thickness is calculated to fill the space left by the pie itself. You can rotate the chart in the X axis to achieve a view that shows less of the wall of the PIE (hence making it look thinner). An X-Angle of ZERO (0) will produce a "flat" PIE. That would be the only way to control the height you are referring to. Regards, RandyJ
  14. Hi,The flag ChartType.ColorLine (TypeMask property) instructs the chart to use the series color to draw the line between markers instead of using the BorderColor, turning this flag OFF will allow you to control the color of the marker independently from the color of the line.Example:chart1.setTypeMask(chart1.getTypeMask() & ~ChartType.COLOR_LINE);for (int i = 0; i < chart1.NSeries; i++) chart1.getSeries().getItem(i).setBorderColor(chart1.getSeries().getItem(i).getColor()); // Copy series color to BorderColor. You can assign BorderColor to anything you want.chart1.setBorderEffect(BorderEffect.None); // Turn OFF Border efect. Use actual color instead.chart1.getPoint(1,1).setColor(java.awt.Color.ORANGE); // Change color of specific point marker.RegardsRandyJ
  15. Hi, When you say "Pointtext", are you referring to the pointlabel tooltips? Could you please post a sample code showing the way you are setting these tooltips in code? Regards, RandyJ
  16. Hi, The length of each bar in a bar chart is automatically calculated based on the actual value being represented by the bar itself. I am not sure I understand what you mean by "the bar chart is unpredictable". Each bar will vary depending on the data being plotted in the chart. If you want to get the chart width or height programatically, you can access the width and height properties of the chart. The step property specifies the interval of major tick marks and gridlines on the selected axis. It also controls the gap or interval between labels in the selected axis. As for the ConstantLines, they are some of the most useful objects when it comes to highlighting information in the chart area. You may want to create constant lines to highlight limits or specific points of interest in the chart. For example, in a scientific application, you may want to use the constant line object to highlight an alarm limit, or in a financial application you may want to highlight a target price or date. These properties do not have to do with each bar's size. Each bar represents an actual value and its size will vary according to this value. For further information on the Chart FX API, please refer to the Resource Center which is installed along with your product. Regards, RandyJ
  17. Hi, Chart FX will position these items automatically, and unfortunately there is no option you can use to alter this behavior. Could you please elaborate a little bit more on what you exactly want to do? Regards, RandyJ
  18. Hi, I am not sure I understand what you meant by "in both cases, my plotting goes beyond the coordinates". Could you please elaborate a little bit more on this? Regards, RandyJ
  19. Hi, Have you dropped the chart control onto a form? Additionally, I noticed you are specifying a color for a series that does not exist yet (Line 5). This may be the line causing the problem. You need to define (add) the actual series to the chart before attempting to access it in the Series Collection (chart.series(0).... cannot be accesed if this series has not been added). Regards, RandyJ
  20. Hi, You need to enable the "ShowEnds" flag of the axis style which forces ChartFX to display the minimum and maximum value independently from the step set to the chart. Take a look at the following sample: Chart1.AxisY.Style |= AxisStyles.ShowEnds; Regards, RandyJ
  21. Hi, Unfortunately, there is no built-in feature to enable label-wrapping. However, as a workaround you can specify a line break (\n) when defining a value for the text property of the point class: Chart1.AllSeries.PointLabels.Format = "%L";Chart1.Points[0, 0].Text = "Line1 \n Line 2";Regards, RandyJ
  22. Hi, Unfortunately, there is no built-in feature to enable label-wrapping. However, as a workaround you can specify a line break (\n) when defining a value for the text property of the point class: Chart1.AllSeries.PointLabels.Format = "%L";Chart1.Points[0, 0].Text = "Line1 \n Line 2";Regards, RandyJ
  23. Hi, Does this problem happen only in Windows Vista? Have you been able to reproduce the same problem when attempting to render the chart on a different operating system? How are you rendering the chart (activex, image)? Regards, RandyJ
  24. Hi, Does this problem happen only in Windows Vista? Have you been able to reproduce the same problem when attempting to render the chart on a different operating system? How are you rendering the chart (activex, image)? RandyJ
  25. Hi, Unfortunately, a built-in feature to specify a different tooltip for axis labels is not included. However as a workaround you can achieve the expected behavior by using the GetTip and MouseMove events. What you should do is simply store X and Y in the MouseMove event and then, during GetTip call HitTest with these values to determine the closest label. The following code snippet illustrates how to do this: private int m_lastMouseX,m_lastMouseY;private void chart1_MouseMove (object sender,HitTestEventArgs e){ m_lastMouseX = e.X; m_lastMouseY = e.Y;} private void chart1_GetTip (object sender,GetTipEventArgs e) { HitTestEventArgs a = chart1.HitTest(m_lastMouseX,m_lastMouseY); if ((a.HitType == HitType.Axis) && (a.Object == chart1.AxisX)) { int closestLabel = (int) Math.Round(a.Value); e.Text = "Long Label " + closestLabel.ToString(); }} Regards, RandyJ
×
×
  • Create New...