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 799 - HTML format (ttfHtml) in the left axis title isn't correctly formatted
Summary: HTML format (ttfHtml) in the left axis title isn't correctly formatted
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 140512
Hardware: PC Windows
: --- enhancement
Target Milestone: v2017.20
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-16 08:07 EDT by yeray alonso
Modified: 2017-03-17 05:19 EDT (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-06-16 08:07:55 EDT
In the following example, the marks are being drawn correctly using the html format, but not the axis title:

var Series1: TBarSeries;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.Axes.Left.Title.TextFormat:= ttfHtml;
  Chart1.Axes.Left.Title.Text := 'Test Title with <b>HTML</b> formatting';
  Chart1.Axes.Left.Labels:=false;
  Chart1.Axes.Bottom.Labels:=false;

  Series1:=Chart1.AddSeries(TBarSeries) as TBarSeries;
  Series1.FillSampleValues();
  Series1.OnGetMarkText:=Series1GetMarkText;
  Series1.Marks.TextFormat:=ttfHtml;
end;

procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
  ValueIndex: Integer; var MarkText: String);
begin
  if Series1.Marks.TextFormat = ttfHtml then
  begin
    if ValueIndex = 1 then
      MarkText := '<b>'+MarkText+'</b><br>'  +
        '<FONT size=10>HTML Format<br>' +
        '<b><FONT color=RED size=8>Custom</b>'
    else
      MarkText := '<b>'+MarkText+'</b><br>' +
        '<FONT color=Blue size=8>HTML Format<br>' +
        '<FONT color=Green size=9>Custom';
  end;
end;
Comment 2 yeray alonso 2017-02-24 06:25:00 EST
Works fine since v2015.14