NiceChart

A Delphi component that will help you create charts.
Download

NiceChart Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Free
  • Publisher Name:
  • Priyatna.org
  • Operating Systems:
  • Windows 2003, Windows 98, Windows 2000, Windows NT, Windows XP
  • File Size:
  • 253.91K

NiceChart Tags


NiceChart Description

Once I need a chart component that can shows interpolated lines for one of my project. I don't need a sophisticated full-featured chart, I just need a simple one with basic functionalities. Don't find a way to do it with standard Delphi TChart component, I decided to write my own. Currently it has three graph styles: lines, smooth lines with B-Splines, and bars. It has multilined title, legend, automatic y-axis, and supports multiple series. It also can produce a monochrome version of the graph using monochromatic brushes. Those features are sufficient for my programming needs. I learned a lot from creating this component. I learned the algorithm to pick axis value range that are aligned to zero from an arbitrary set of values. I also learned some linear interpolation algoritms, although currently only B-splines that is accomodated in this component. And finally I understand why there's only a handful chart component out there. There are some main methods of the component: procedure BeginUpdate; ■ Call this method to prevent control updating its content. This is useful when you want to add bulky data to the chart. Don't forget to call EndUpdate when you are done supplying data. procedure EndUpdate; ■ Call this method to reenable update. You must call BeginUpdate prior to call this method. function AddSeries(AKind: TSeriesKind): TNiceSeries; ■ Add a new series to the chart. A series can be a bar, line or smooth line type. function ClientToChart(const X, Y: Integer; var AX, AY: Double): Boolean; ■ Call this function to get X-axis and Y-axis value from mouse position. The X and Y parameters are the mouse position, and the corresponding X-axis and Y-axis values are stored in AX and AY variables. This function returns True if the supplied mouse position is within the X-axis and Y-axis range. Otherwise, it returns False. procedure RemoveSeries(ASeries: TNiceSeries); ■ Removes a series from the chart. procedure Clear; ■ Removes all series from the chart. function CreateMetafile: TMetafile; ■ Creates metafile (WMF) from the chart. This function is useful when you want to save the content of the chart to a file. procedure CopyToClipboard; ■ Copies the content of the chart to the clipboard. The content can be pasted in any application as a graphic image.


NiceChart Related Software