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 639 - empty marks display non-empty marks text.
Summary: empty marks display non-empty marks text.
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: 140220
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 12:14 EDT by narcís calvet
Modified: 2014-03-17 09:34 EDT (History)
1 user (show)

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


Attachments
Only one mark (index 3) should be displayed. (5.94 KB, application/x-zip-compressed)
2014-03-14 12:14 EDT, narcís calvet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description narcís calvet 2014-03-14 12:14:17 EDT
Created attachment 117 [details]
Only one mark (index 3) should be displayed.

The attached project should only display display a mark, where index is 3, other marks should not be displayed. However, it copies the same mark for all points in the series.

A workaround is implementing OnGetMarkText event like this:

procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
  ValueIndex: Integer; var MarkText: String);
begin
  if Series1.Labels[ValueIndex]='' then
    MarkText:='';
end;
Comment 1 david berneda 2014-03-17 07:41:45 EDT
This behaviour has always been like this.

The default "smsLabel" style will use the point Label, and if empty, it will use the point Value.

We will need to add a new style enum to not break backwards compatibility:

  Series1.Marks.Style :=  smsLabelOnly ;
Comment 2 david berneda 2014-03-17 09:34:56 EDT
Fixed. The best solution is:

1) A new enum has been added, and this new enum is made the default:

Series1.Marks.Style := smsLabelOrValue

2) The existing smsLabel will now return only the series point text Label.

If label is empty (''), no mark will be displayed.


--------

Compatibility:

Existing charts with old default smsLabel will use the new smsLabelOrValue when loaded.  Everything will work as before.

The only backwards-compatible problem is when Style is set by code to "smsLabel".  In this case, empty Labels will not display Value.
If this is the desired behaviour, style should be set to smsLabelOrValue.