Comparison between TAChart and TeeChart Standard lazarus / 55-TAChart ---------------------------------------------------------------------- wp · 2012-10-11 18:52 As motivated in another discussion, I uploaded a comparison between TAChart and Delphi XE2's TeeChart Standard to the wiki. Note that this is work in progress, and so far, it covers only a small fraction of the properties, and I even don't know if I will ever finish it... http://wiki.lazarus.freepascal.org/Comparing_TAChart_with_Delphi%27s_T eeChart_Standard ---------------------------------------------------------------------- Ask · 2012-10-12 11:01 Thank you. I have added a small introduction text Perhaps TAChart word is repeated needlessly -- how about just "Not available" instead of "Not available in TAChart", with a comment in front explaining this format. Made some changes -- below are points of which I am unsure: QuoteClipPoints: boolean, default true: toggles the drawing of series points within chart boundaries, preventing other chart regions from being overwritten. TAChart: ? I believe it is "Not available, works as always true" QuotePrintProportional: no built-in printing support in TAChartThere is some support although probably not for this property. QuoteSeriesGroups ... an easy way to show or hide multiple series, that is, show or hide individual groups of series." Part of this can be achieved in TAChart by multivalued series.If this is all, then I do not think multivalued series will help, it is just missing. QuoteSeriesList: opens the chart editor. Missing in TAChart.The chart editor is missing, but the property itself is available and called Series? QuoteVisible, With: standard VCL/LCL properties,Is there really a property called "With" or is it a typo? QuoteLabelsAlign: if alDefault labels of vertical axes are aligned towards the axis line (left axis: right-aligned), if alOpposite they are aligned away from the axis line (left axis: left-aligned). Not available in TAChart (or Marks.Alignment ?) No, Marks.Alignment controls the alignment of multi-line labels. I do not quite understand the description -- are labels drawn over the plot if the LabelsAlign = alOpposite? QuoteLabelsMultiLine: allows multi-line labels. No direct correspondence in TAChartI'd rather say that in TAChart it is "as if always set to true" -- i.e. any label with multi-line text is displayed as multi-line. ---------------------------------------------------------------------- wp · 2012-10-12 16:40 Thank you for reading. In the meantime, I also added a section on TChartLegend. Quoteare labels drawn over the plot if the LabelsAlign = alOpposite?No, see attached screenshot. The screen shot shows also the effect of StartPosition and EndPosition (both at 10 (percent)) - I think there is no correspondence of that in TAChart. QuoteIs there really a property called "With" or is it a typo?Width... ---------------------------------------------------------------------- Ask · 2012-10-14 05:13 Quoteadded a section on TChartLegend After a quick look, I have found a "low-hanging fruit": implemented Legend.GridHorizontal and Legend.GridVertical properties in r39074, which should correspond to DividingLines. QuoteTextSymbolGap: Like SymbolWidth of TAChart.I suspect it is actually a distance between the symbol and the legend item text (which is currently hard-coded as SYMBOL_TEXT_SPACING constant in TAChart). Can you confirm that? Also, what units are used? ---------------------------------------------------------------------- wp · 2012-10-14 09:48 Quoteimplemented Legend.GridHorizontal and Legend.GridVertical properties in r39074, which should correspond to DividingLines.Thank you. Updated the wiki correspondingly. QuoteCan you confirm that? Also, what units are used?You are right - my head was spinning with all these details... Units seem to be pixels. (There seems to be a bug in TeeChart because the chart is not updated immediately after changing this property). I corrected the wiki and, additionally, uploaded another section on TLegendSymbol which defines more properties of the symbol in the legend. ---------------------------------------------------------------------- Ask · 2012-10-14 17:23 QuoteIn addition to TChartPen TeeChart uses also descendants with slightly different default settingsTAChart does this too, although a set of descendants is different. Quotethe subproperty DrawEvery:integer which allows to skip every other grid line is not supported, however.There is Axis.Marks.Stripes property which allows advanced control over grid lines. In particular, DrawEvery can be emulated. ---------------------------------------------------------------------- wp · 2012-10-14 22:37 QuoteTAChart does this too, although a set of descendants is different.I just wanted to say that I do not want to repeat the comparison for every descendant of TChartPen. QuoteThere is Axis.Marks.Stripes property which allows advanced control over grid lines. In particular, DrawEvery can be emulated.Good point, didn't know that. I updated the wiki accordingly. ---------------------------------------------------------------------- wp · 2012-10-16 21:30 Completed a section on the properties of TeeChart's TBarSeries. Ask, could you have a look since I did not use the bar series a lot so far? ---------------------------------------------------------------------- Ask · 2012-10-17 17:39 1) [Quite minor] the object inspector image contains tab names in German 2) AutoBarSize -- it might be similar to BarWidthStyle=bwPercentMin, but I am not sure from the description. 3) BarHeight -- is it an indexed property? Otherwise, height of which bar it is? 4) MarksLocation and MarksOnBar -- you did not describe those. From the names it seems that they are similar to TAChart's MarkPositions property 5) UseYOrigin -- what happens if it is false? When I implemented UseZeroLevel property for area series, I thought it makes no sense for bar series ---------------------------------------------------------------------- wp · 2012-10-17 22:30 Quotethe object inspector image contains tab names in GermanI know but I don't have any idea how to change language in Delphi. I'll update the image once I know. QuoteAutoBarSize -- it might be similar to BarWidthStyle=bwPercentMinDon't see any change between true and false, bar width is always the same, even if bars are irregularly spaced. Maybe a bug? QuoteBarHeight -- is it an indexed property? Otherwise, height of which bar it is?Good point. After additional testing I found that there is not BarHeight property at all. It refers to the HorizBarSeries instead which is treated in the help file along with the normal BarSeries. QuoteUseYOrigin -- what happens if it is false? The bar bottom jumps back to zero. It allows temporarily resetting of the zero level without having to buffer the zero level value. Not very important in my eyes. QuoteMarksLocation and MarksOnBar -- you did not describe thoseMust have overlooked them in the long list of properties... Yes, you are right: MarksLocation is similar to MarkPositions. Position are not drawn correctly if YOrigin is used, a plus for TAChart. A (minor) minus for TAChart: marks cannot be centered within the bar. BTW, can TAChart show marks for each stack level of stacked bars? Using YIndex I can assign the marks only to one stack level. And can TAChart draw the "stack levels" side-by-side? I wrote in the section on MultiBar that TAChart can do "mbSide" -- maybe this is wrong. Of course, by using several single-valued series, but how to control the spacing between the groups? The attached screenshot shows some of the features: - MultiBar = mbSide - MarksLocation = mlStart (Series3), mlEnd (Series4), MarksOnBar=false (Series5) - BarStyle = bsSlantCube (Series5) - x labels with image background and shadow ---------------------------------------------------------------------- Ask · 2012-10-18 02:54 QuoteI don't have any idea how to change language in DelphiActually I'd prefer to remove tag names from the image, like in other screenshots. QuoteCan TAChart show marks for each stack level of stacked bars?Yes, set YIndex = -1 QuoteOf course, by using several single-valued series, but how to control the spacing between the groups?Using BarOffsetPercent ---------------------------------------------------------------------- wp · 2012-10-18 10:54 Thank you. TAChart is the first charting package that I found which supports stacked groups of bars! The chart with attached screenshots was created as follows: - 3 bar series - all with BarWidthPercent 30 - BarOffsetPercent -30, 0, 30 for the first, second, third bar, respectively - first bar with 2 y values - marks LabelBrush set to bar color - a list source containing "Spring", "Summer", "Fall", "Winter" assigned to the values 0..3 is used as marks source for the bottom axis. Some questions: - If bars are grouped side-by-side the marks do not point to the corresponding bar, but always to the center of the group. Is this a bug, or can I shift the marks horizontally? - How to assign the labels ("summer" etc.) to be underneath each group? (see second screenshot) - How to set the marks Labelbrush for the gray sub-bar of the first bar? ---------------------------------------------------------------------- Ask · 2012-10-18 11:02 Please post your test application ---------------------------------------------------------------------- wp · 2012-10-18 12:15 Here it is ---------------------------------------------------------------------- Ask · 2012-10-18 16:32 Quotemarks do not point to the corresponding bar, but always to the center of the groupFixed in r39130. QuoteHow to assign the labels ("summer" etc.) to be underneath each group?Labels should have X value corresponding to the X value of the bar series (in the case of your demo, it is accomplished by setting XMax = 3 for all random sources). I have also made some of improvements to the axis look. See attached version of your demo. QuoteHow to set the marks LabelBrush for the gray sub-bar of the first bar?Currently impossible. It is also impossible to set different colors for different marks of the same series, which IIUC can be done in TeeChart. I have a plan for a generic infrastructure for this, also involving other embellishments like shadow and transparency, but, as I have already written, I am still unable to get the correct design given the limitations of Lazarus object inspector and component streaming. BTW, I have already experimental code for the shadow support, but it also lacks an API. ---------------------------------------------------------------------- wp · 2012-10-18 21:02 I am deeply impressed by the improvements in this version. Particularly I like the new object tree which makes accessing the subcomponents of TChart much easier. Or is this caused by a general change in object inspector since I do not find corresponding comments in your svn modifications? Thanks for modified demo. Don't care about coloring of the Labelbrush of the stacked bars - that's really not important. When playing with your demo to find out how you achieved the vertical dividing lines, however, I came across a crash of Lazarus: - In the object tree, select the bottom axis - In the object inspector, open the subitems of grid of this axis - Set Visible to true - Set Visible to false --> Lazarus crashes after you click somewhere else ---------------------------------------------------------------------- Ask · 2012-10-23 12:22 Quoteis this caused by a general change in object inspectorYes, r39097 and following. QuoteI came across a crash of LazarusUnfortunately, the change above also caused a lot of bugs, including the one you noticed. I have reported them: http://bugs.freepascal.org/view.php?id=23176 http://bugs.freepascal.org/view.php?id=23180 http://bugs.freepascal.org/view.php?id=23179 http://bugs.freepascal.org/view.php?id=23178 http://bugs.freepascal.org/view.php?id=23177 http://bugs.freepascal.org/view.php?id=23181 Until those are resolved, TAChart will be quite unstable at design- time. ---------------------------------------------------------------------- wp · 2012-10-23 13:01 Thanks. So I'll be cautious when updating Lazarus from snapshots during the next days, and from svn I'll use only the TAChart modifications.