Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9147079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:54:03+00:00 2026-06-17T10:54:03+00:00

I have a TAreaSeries filled with data like this: I’m using this code to

  • 0

I have a TAreaSeries filled with data like this:
enter image description here

I’m using this code to draw vertical lines on the chart:

procedure TfrmDistributionChart.dbcDistributionAfterDraw(Sender: TObject);
var
  XPos: Integer;
begin
  dbcDistribution.Canvas.Pen.Width := 3;

  dbcDistribution.Canvas.Pen.Color := clBlack;
  XPos := dbcDistribution.BottomAxis.CalcPosValue(0);
  dbcDistribution.Canvas.DoVertLine(XPos, dbcDistribution.LeftAxis.IStartPos,
    dbcDistribution.LeftAxis.IEndPos);

  dbcDistribution.Canvas.Pen.Color := clBlue;
  XPos := dbcDistribution.BottomAxis.CalcPosValue(-SD);
  dbcDistribution.Canvas.DoVertLine(XPos, dbcDistribution.LeftAxis.IStartPos,
    dbcDistribution.LeftAxis.IEndPos);
  XPos := dbcDistribution.BottomAxis.CalcPosValue(SD);
  dbcDistribution.Canvas.DoVertLine(XPos, dbcDistribution.LeftAxis.IStartPos,
    dbcDistribution.LeftAxis.IEndPos);

  dbcDistribution.Canvas.Pen.Color := clGreen;
  XPos := dbcDistribution.BottomAxis.CalcPosValue(-2 * SD);
  dbcDistribution.Canvas.DoVertLine(XPos, dbcDistribution.LeftAxis.IStartPos,
    dbcDistribution.LeftAxis.IEndPos);
  XPos := dbcDistribution.BottomAxis.CalcPosValue(2 * SD);
  dbcDistribution.Canvas.DoVertLine(XPos, dbcDistribution.LeftAxis.IStartPos,
    dbcDistribution.LeftAxis.IEndPos);

  dbcDistribution.Canvas.Pen.Color := clRed;
  XPos := dbcDistribution.BottomAxis.CalcPosValue(-3 * SD);
  dbcDistribution.Canvas.DoVertLine(XPos, dbcDistribution.LeftAxis.IStartPos,
    dbcDistribution.LeftAxis.IEndPos);
  XPos := dbcDistribution.BottomAxis.CalcPosValue(3 * SD);
  dbcDistribution.Canvas.DoVertLine(XPos, dbcDistribution.LeftAxis.IStartPos,
    dbcDistribution.LeftAxis.IEndPos);
end;

I would like to change the color of the series to match the color of its outer border (e.g. blue for the central slices, green for the middle ones, and red for the outermost ones). Is this possible with TeeChart Standard v2011.03.32815 32bit VCL?

Also, I couldn’t find the correct way of trimming my vertical lines in order to refrain from expanding beyond the area they are drawn on. How should I calculate the proper height of each of these 7 lines?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:54:04+00:00Added an answer on June 17, 2026 at 10:54 am

    There are two ways to set the colors:

    • When you add values to the series.

      Series1.AddXY(xVal,yVal,'',clYourColorBasedOnX(xVal));
      

      Where clYourColorBasedOnX( x : Double): TColor; is a function you define.

    • Before presenting the series.

      Series1.ColorRange(Series1.XValues,x1,x2,clYourColor);
      

      A set of calls with your ranges.


    As for the user drawn lines max value, try walking Series.XValues[i] until you find the closest limit value, take the index and set max to Series1.YValues[index].

    Repeat until all limits are set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a look at this code: #include <iostream> using namespace std; int main() {
Have a xml data like <Items><Item><name>test1</name></Item><Item><name>test2</name></Item></Items> Looks like jaxb cannot unmashall this when defining
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
Have a look at this code sample or go to the jsfiddle function printRelation(a,
Have written all the code in a silverlight class library (dll) and linked this
Have the following code: $(#blogs).mouseover( function () { $(this).addClass(hover); $(#home).removeClass(hover); $(#homepages).removeClass(hover); $(#apps).removeClass(hover); $(#facebook).removeClass(hover); $(#kontakt).removeClass(hover);
Have a look at this snippet: #include <string> #include <iostream> #include <vector> using namespace
have this code import threading def Thread(f): def decorator(*args,**kargs): print(args) thread = threading.Thread(target=f, args=args)
Have a look to this code snippet:- -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [webData setLength:
Have a text box which get data for price. If someone enter something like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.