SDL Component Suite - RChart

      This component has been awarded the "Delphi™ Choice '96" award from The Delphi Information Connection !

click here to see the full imageThe component RChart is an easy to use scientific chart component. It provides the most basic features for displaying charts in an arbitrary coordinate system. You can set up both the dimensions of the chart on the screen and the range of the real-valued data area in the chart. The component automatically creates suitable scales in a 1-2-5 raster (both linear and logarithmic) and provides flicker-free display of animated drawings. In addition, there are built-in routines for zooming and panning the data window.

The unit RCHART is part of the SDL Component Suite. A screen shot of an example program shows how simple it is to create a chart by using the component RChart. More details can be found in the online help pages.
 

Free Sample Programs
Following is a short list of sample programs showing the functionality of RChart.
More programs can be found here.

Histograms A simple application to display bargraphs using RCHART. The angle, depth and height of the bars can be changed. rch3dbar.zip
(303 kB)
Process Control Shows how to implement a simple running chart for process control. The chart is based on RCHART and displays the last two minutes of data acquired from a virtual process. processc.zip
(315 kB)
Shared Diagrams This application nicely shows how set up several RCHARTs which share common data. rcshared.zip
(295 kB)
Running Charts RCHART is used to display a "running" chart like in chart recorders. rchfifo.zip
(299 kB)


What's new:

  • Release 10.5   [Oct-10, 2016]
     
    • the method Arc draws an elliptical arc
    • the standard layout "rcl_X2Both_Y2Both" has been revised
    • the new event OnBeforeCrossHairMove allows to block interactive crosshair movement
    • bug fix: ResetComp was private instead of public

  • Release 10.4   [Jun-02, 2015]
     
    • the method LineOffset draws a line with a pixel offset
    • the array property MouseTrace contains the recorded mouse positions
    • the properties MouseTraceInvert and MouseTraceColor control the mode and the color of the mouse trace
    • the method ClearMouseTrace clears the mouse trace
    • the property NumMTracePoints returns the number of recorded mouse trace points
    • the method ResetComp initializes the component to its default state
    • crosshairs 1 to 4 are displayed in reverse order (crosshair 1 is always on top)
    • bug fix: relative rectangles were not included in autorange calculations
    • bug fix: CopyToOpenPrinter did not work (bug was introduced with release 10.3)

  • Release 10.3   [Oct-06, 2014]
     
    • the new method FindNearestItemAlongAxis finds the drawing item which is closest to a reference position using the distance along an axis
    • the property MinDupMarkDist allow to control the required minimum distance of marks in order to be drawn
    • VCL styles are now supported and coupled to the property StyleElements
    • BackGroundImg.AreaLeft, .AreaRight, .AreaTop and .AreaBottom are scaled to the active layer (instead of layer 1)
    • BackGroundImg.AreaMode has been extended by bamRectInv, bamVStripeInv, and bamHStripeInv
    • maPanGrid is a new option for MouseAction, forcing the panning movement to snap in on a grid
    • the TRChart.OnRubberBand event has been renamed to OnSelectRect and the new OnRubberBand is triggered if the MouseAction property is set to maRubberBand
    • PanGridDx and PanGridDy control the panning movement
    • new overloaded methods CopyToClipboard, CopyToClipboardDAOnly, CopyToBitmap, and CopyToBitmapDAOnly allow to include the crosshairs as well
    • declaration of the types TRGB32, TRGB32Array, and PRGB32Array
    • bug fix: SetEqualRangeYOnly now works as expected (SetEqualRangeYOnly erroneously copied the x-range to the y-range)

  • Release 10.2   [May-30, 2013]
     
  • Release 10.1   [Oct-29, 2012]
     
  • Release 10.0   [Oct-4, 2011]
     
    • exception is raised if a logarithmic axis is set to negative values
    • class TContourPlot now offers the method SetIsoParams to set the isohypses parameters at once
    • the new readonly properties TContourPlot.MinPivot and TContourPlot.MaxPivot return the span of z-values of a contour plot
    • bug fix: AutoRange, AutoRangeXOnly, and AutoRangeYOnly now work correctly for joint layers
    • the property TContourPlot.SuppressPaint is now available for suppressing paint updates

  • Release 9.7   [May-31, 2010]
     
    • new element RectangleRelPix implemented
    • the simple text labels (created by the method Text) can now be offset by a number of pixels and can be aligned individually
    • a double click on the component does no longer trigger the MouseDown event in addition to the OnDblClick event
    • a double click on the component does no longer trigger the MouseDown event in addition to the OnDblClick event
    • MouseAction supports now maRubberBand and triggers the OnRubberBand event when the mouse is released
    • bug fix: vertical alignment of TextLabels containing several lines is now working as expected
    • bug fix: line of tkArrow element was offset by one pixel
    • bug fix: caption of chart did not scale properly when printing the chart
    • bug fix: problems with logarithmic scales upon interactive zooming fixed
    • bug fix: black and white copy of chart showed colored labels
    • bug fix: memory leak fixed (caused by not freeing TJointLayers and TColorArray)
    • bug fix: crosshair of contour plot was not accessible under C++

  • Release 9.51   [Dec-01, 2008]
     
    • bug fix: the font of the chart caption is now correctly taken from the Font property

  • Release 9.5   [Oct-31, 2008]
     
    • setting the property ScaleNX/Y.MinTicks to zero forces tick marks to be displayed at every integer value along the axis
    • bug fix: the color of the scale ticks and the color of the scale labels can now be set independently

  • Release 9.0   [May-28, 2007]
     
    • TSmithChart is a new component derived from RChart. It supports Smith charts which are commonly used in electronics and electrical engineering
    • new method SetEqualScales implemented
    • new method SetEqualScalesXOnly implemented
    • new method SetEqualScalesYOnly implemented
    • mouse wheel events are now published
    • function FindUsedLayers implemented
    • improvement: the background color of dashed lines is now controlled by the property FillColor
    • improvement of the methods AutoRange, AutoRangeXOnly, and AutoRangeYOnly
    • bug fix: AddTextLabel now works as expected (bug was introduced with release 8.5)
    • bug fix: mouse cursor adjusts its image according to MouseAction (bug was introduced with release 8.5)
    • bug fix: changing the range of any axis does no longer force several repaints
    • bug fix: rectangles and ellipses are now filled with the correct color after switching from transparent to opaque items
    • bug fix: maZoomWind now keeps scale ratio of axes if IsoMetric is TRUE
    • bug fix: number of grid lines per axis is no longer limited to 50 (new limit is 250)

  • Release 8.5   [Feb-18, 2006]
     
  • Release 8.2   [Nov-03, 2004]
     
    • new abstract base class TCustomRChart introduced (as an ancestor of TRChart and the future TQuickChart)
    • bug fix: number of tickmarks does not jitter when an axis, whose range is a multiple of 2 or 5, is shifted

  • Release 8.1   [Aug-29, 2004]
     
    • available for Delphi™ 8 for .NET
    • TRChart is now inherited from TCustomControl (instead of TGraphicControl)
    • the events OnKeyUp, OnKeyDown, and OnKeyPress are now available
    • new property JointLayers allows to couple axes of specific layers
    • new array property LayerVisible controls visibility of data belonging to a specfic layer
    • new methods AllTextLabelsOff and SetTextLabel implemented
    • FindMinMax can now be layer specific
    • SetRange and AutoRange may now set the range of all layers at once
    • AutoRangeXOnly and AutoRangeYOnly implemented
    • bug fix: text alignment of text labels is now independent of alignment changes in any events
    • bug fix: AddTextLabel now sets all properties correctly
    • bug fix: invalid index into the text label array does no longer generate a general access violation
    • bug fix: FillColor is now correctly processed after Text method
    • bug fix: OnScaleTickDrawn is now triggered for x-axes, too
    • bug fix: grid does not overwrite axes (bug was introduced with Rel. 8.0)

  • Release 8.0   [Apr-15, 2004]
     
    • RChart now provides up to 16 independently scaled layers
    • improved performance and easier access to the chart elements by replacing the linked list by a dynamic array (DataContainer)
    • drawing speed of crosshairs improved significantly
    • short tick marks can now be displayed on all types of y axes (not only on log. axes)
    • TDrawCan replaced by TrcChartItem
    • ItemType renamed to TrcItem
    • SaveLinkedList, SaveLinkedListASC, and LoadLinkedList renamed to SaveData, SaveDataASC, and LoadData
    • new properties NumItems and AllocSize
    • property SuppressPaint implemented
    • MouseCursorFixed is now TRUE by default
    • ScaleColor renamed to ChartFrameColor
    • CopyToOpenPrinter and PrintIt provide now high resolution, CopyToOpenPrinterHiRes and PrinitItHiRes are no longer available
    • CopyToWMF has now black and white option
    • CopyToClipboardWMF implemented
    • TScaleType moved to SDLBase
    • TDtLabel moved to SDLBase
    • YearLengthType renamed to TYearLength and moved to SDLBase
    • DateOrderType renamed to TDateOrder and moved to SDLBase
    • DateForTimeType renamed to TDateForTime and moved to SDLBase
    • TTxtLblMode moved to unit SDLBASE
    • TShadowStyle moved to unit SDLBASE
    • type declaration ZoomStateType has been renamed to TZoomState and moved to unit SDLBASE
    • TRFrameStyle replaced by TFrameStyle (of unit SDLBase)
    • TZoomPanEvent has been moved to SDLBASE
    • DrawMarkOnCanvas has been moved to SDLBASE
    • TCrossHair is now part of SDLBASE
    • type declaration FigType renamed to TFigType and moved to SDLBase
    • PDrawCan discarded (no longer needed)
    • bug fix: TimeSeparator now works correctly
    • bug fix: CopyToWMF now performs correct clipping of chart data
    • bug fix: background image editor now works properly
    • bug fix: ScaleSelectedItems did not correctly scale elements with more than one reference point (i.e. lines, rectangles, ellipses, etc)

  • Release 7.2   [Mar-23, 2003]
     
    • RCHART is now part of ChartPack
    • new event OnBeforeRenderData allows to draw on chart canvas beneath the chart data
    • bug fix: logarithmic grids are now drawn correctly if GridDx/GridDy is -2 or -3
    • bug fix: text labels have been printed with huge fonts

  • Release 7.0   [Sep-15, 2002]
     
    • available for Delphi™ 7.0
    • the unit is now CLX compatible
    • new method Arrow to draw arrows in a chart
    • CopyToWMF is now again available
    • size of ZoomHistory stack increased to a maximum of 16 entries
    • new property ZoomStack: values of ZoomHistory are now directly accessible
    • event OnResize published
    • bug fix: ClearZoomHistory did not really clear the stack but set only the stack pointer
    • bug fix: an excess number of differently colored filled graphics elements do no longer corrupt color palette (resulting in black artefacts when using tkRect, tkRectFrame, tkEllipse, and tk3DBar)
    • bug fix: OnScaleTickDrawn now correctly sets the parameter CurrentTickPos

  • Release 6.5   [May-28, 2002]
     
    • available for C++Builder™ 6.0
    • RChart now supports drag and drop
    • additional symbols for method MarkAt
    • new method DrawMarkOnCanvas
    • type declaration InscriptStr and LabelStr discarded to become compatible with BCB 6
    • bug fix: logarithmic axis do no longer cut trailing zeroes in exponents
    • bug fix: crosshair is no longer drawn outside of chart window if 3D shadow is enabled
    • bug fix: text label border line has now always a width of 1 pixel
    • bug fix: CopyToOpenPrinterHires now prints correctly with landscape orientation

  • Release 6.0  [Aug-06, 2001]
     
    • available for Delphi™ 6.0
    • new properties XAxisPos and YAxisPos implemented
    • property ClassicLayout implemented
    • MouseBox now works more intuitively (left mouse button has to be kept pressed while drawing the mouse box)
    • MouseBoxAbort implemented
    • OnDataRendered and OnScalesRendered events implemented
    • OnScaleTickDrawn event implemented
    • bug fix: TextLabels did not display correctly with solid background color
    • bug fix: AddTextLabel now accepts parameters PosX, PosY as floating point values
    • bug fix: Y-axis using the ftTime format is drawn correctly for inverted scales (RangeLoY > RangeHiY)
    • bug fix: inverted numeric scales now draw the top most scale tick correctly (occurred in rare circumstances)
    • bug fix: memory for text labels fonts is now correctly allocated
    • bug fix: FindNearestItemScreen does not create "integer overflow" error when zoomed in by a large factor
    • bug fix: property editor form for BackgroundImg is now declared in interface section
    • bug fix: zoom box now follows the mouse correctly if MouseAction is maZoomWind and Isometric is TRUE
       
  • Release 5.5  [Jun-09, 2000]
     
    • RChart is now available for C++Builder™ 5
    • published property Anchors and Contraints
    • bug fix: the mouse cursor is reset to its default image when leaving the chart
    • ClearZoomHistory implemented
    • bug fix: zoom by mouse, SetRange and AutoRange is now handled correctly if property IsoMetric is true
    • shadow of text labels implemented (properties TextLabels[].Mode, TextLabels[].ShadowDx, TextLabels[].ShadowDy, and TextLabels[].ColorShadow)
    • multiline labels implemented
    • MoveToRelPix and DrawToRelPix implemented
    • bug fix: properties MousePosX, MousePosY, CrossHair1..4, IdAbscissa, IdOrdinate, MinTickX, MinTickY can now also be read by C++ programs (problem was due to a bug in BCB3, 4 & 5, but not in BCB1)
       
  • Release 5.0  [Sep-25, 1999]
     
    • RChart is no longer available for Delphi™ 2
    • RChart is now available for Delphi™ 5
    • chart elements are now stored in a doubly linked list
    • LoadLinkedList and SaveLinkedList use a new file format
    • new property LastItemOfLinkedList
    • runtime version does no longer contain property editor
    • PenStyle implemented
    • MarkAt has now 14 more symbols
    • cross hairs are now accessible as properties CrossHair1...CrossHair4
    • cross hairs can now be moved interactively by mouse (MouseAction = maDragCrossH)
    • DecPlaceX and DecPlaceY extended to a maximum of 12 digits
    • RangeLoX, RangeHiX, RangeLoY, and RangeHiY are now of type "extended" for better accuracy when zooming into very small regions
    • new properties MinRangeX and MinRangeY
    • OnCrossHairMove event implemented
    • data sharing between several charts implemented (property UseDataOf)
    • user-defined text labels implemented (property TextLabels)
    • AddTextLabel implemented
    • OnTextLabelMove event implemented
    • FtTime displays now down to milliseconds
    • RemoveItemByClass implemented
    • resolution problems with labeling of axes resolved
    • bug fix: MarkAt (items 13, 14, 15) are now correctly filled
    • bug fix: ftDateTime can now handle dates before 1900 correctly
    • bug fix: zero values of RangeHiX/Y and RangeLoX/Y are now correctly loaded
    • bug fix: CrossHairPosY now returns y value correctly
    • bug fix: ItemCount is now correct after LoadLinkedList (FName, true)
    • bug fix: AutoRange now works correctly for logarithmix scales
    • bug fix: background bitmap editor in D4 now works correctly