Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 646 - Choose the position in the horizontal axis for the mbSelfStack MultiBar style to be drawn
Summary: Choose the position in the horizontal axis for the mbSelfStack MultiBar style...
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: 140220
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-18 11:21 EDT by yeray alonso
Modified: 2016-04-04 10:39 EDT (History)
3 users (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
test project with possible fix (2.28 KB, application/x-zip-compressed)
2016-02-15 06:10 EST, yeray alonso
Details
testing new properties (2.19 KB, application/octet-stream)
2016-04-04 08:49 EDT, yeray alonso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-03-18 11:21:00 EDT
At the moment, when mbSelfStack MultiBar style is set, CalcXPos and MinXValue calculate the position of the index of the series instead of using the XValues if present:

function THorizBarSeries.MinYValue: Double;
begin
  if MultiBar=mbSelfStack then
     result:=SeriesIndex
  else
     result:=inherited MinYValue;
end;

However, there's a customer who would like mbSelfStack MultiBar style to be controllable where it's being drawn in the horizontal axis.

We could use the first value in the XValue list if present. And maybe we should add some property to activate this behaviour.

Have should decide how to proceed when this property is activated and no XValue is found, or if the bar will overlap a previously drawn bar,...
Comment 1 christopher ireland 2014-03-18 11:44:59 EDT
This issue also covered recently in .NET, the workaround again being to use a Stacked rather than SelfStacked MultiBar style:
http://www.teechart.net/support/viewtopic.php?p=64864#p64864
Comment 2 david berneda 2014-03-19 12:14:46 EDT
One possible solution is:

Series1.SelfStackedPosition := 23.6;

But its a name too long for a property.

Using the XValues can be a good solution, and it will allow positioning each bar point at a different X position (if desired).

The problem is to choose a good name for the property that will activate this behaviour.  

One solution can be detecting if the series has X values, then use them.
If not, use the current way of positioning at SeriesIndex.
Comment 3 yeray alonso 2016-02-15 06:10:25 EST
Created attachment 550 [details]
test project with possible fix

The same initial VCL customer in a new thread notes working with tables would add complexity to the Stacked option:
http://www.teechart.net/support/viewtopic.php?f=3&t=15961

Ie, if you have several tables each one willing to be a stacked column (in an unforced X position), switching to Stacked bars would imply some work on the tables before assigning them to the series.
Comment 4 yeray alonso 2016-04-04 08:49:09 EDT
Created attachment 582 [details]
testing new properties

Project to test properties SelfStackPosition and UseSelfStackPosition.