2009/9/24 Andrea Mauri <[email protected]>: >> Still, if you have inclination to work on a patch, I would suggest to change >> TLineSeries.ShowLines property from boolean to enumeration >> (slNone, slFromPrevious, slFromOrigin). > I created a patch (attached) introducing the property TLineType TLineType = > (ltFromPrevious, ltFromOrigin);
Yes, your patch is generally a step in the right direction. I committed it as r21852 with a few improvements: 1) Added explicit default value for LineType property -- this is required by current Lazarus policy 2) Removed code duplication in Draw procedure -- duplicated code is always undesirable. > I left unchanged the ShowLines property also for retro compatibility. Indeed, backward compatibility is important. But I also feel that it is important to avoid excessive complexity. To this end, I tried the implementation which should hide ShowLines property from object inspector, but still read it from old .lfm files. Please test that loading old form with ShowLines = True and False results in LineType set to ltFromPrevious and ltNone correspondingly. > I think that could be useful set the Origin in some way (a Origin > property?), by default Origin should be 0, 0 but could be changed by the > user. Do you think it is a good idea? No, I do think this is too much. If the user arises who really needs such a property, then it can be considered, but even your use case is IMO very rare. > Another thing is that if the Chart points have for example XMax= 2 Xmin= 1 > YMax =2 and YMin = 1 the Origin is not visible. How can I overcome this > problem? Actually I do it using XMax, Xmin etc of the Extent property of > the TAChart, do you think that is it the best way? Of course, this is exactly what they are designed for. -- Alexander S. Klenin -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
