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

  • SEARCH
  • Home
  • 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 8804867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:43:03+00:00 2026-06-14T01:43:03+00:00

I have a simple chart where a line rise from negative to positive: it

  • 0

I have a simple chart where a line rise from negative to positive: it crosses the horizontal axis. For readability, I did set the AxisY crossing to zero.

ChartAmortisation.ChartAreas("Amortisation").AxisY.Crossing = 0

But doing so, the label of my x-axis stays below, under the chart, while the x-axis is above in the middle of the chart area.

How can I set the AxisX label under the axis, or next to it?

Axis label should follow the axis

  • 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-14T01:43:04+00:00Added an answer on June 14, 2026 at 1:43 am

    I succeeded using Annotations. I made this for the two axes in order to preserve visual coherence. Here is my code for the vertical axis.

    Dim caLabelAxisY As New TextAnnotation
    With caLabelAxisY
            .AnchorX = 0
            .AxisX = ChartAmortisation.ChartAreas(0).AxisX
            .AnchorY = ChartAmortisation.ChartAreas(0).AxisY.Maximum 
            .AxisY = ChartAmortisation.ChartAreas(0).AxisY
    
            .Name = "Label AxisY"
            .Text = "Investition / Überschuss"
            .Font = New Font("Microsoft Sans Serif", 9, FontStyle.Bold)
    
            .AnchorAlignment = ContentAlignment.TopLeft
    End With
    

    Strangely enough, setting the AnchorY did not work with the name of the chart, but only with its index. This means:

    'What works:
    caLabelAxisY.AnchorY = ChartAmortisation.ChartAreas(0).AxisY.Maximum  
    'What doesnot work:
    caLabelAxisY.AnchorY = ChartAmortisation.ChartAreas("Amortisation").AxisY.Maximum  
    

    Also, this only worked when I set the Annotations programmatically. Setting these in the Designer of Visual Studio 2010 helped me to visualise what the result would be, but did not display anything at runtime.

    And finally, here is how it looks like now.
    Problem solved

    The labels are located inside the Chart for more convenience place them (otherwise I should bother with the size of the numbers on the axis)

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

Sidebar

Related Questions

I have a simple line chart being fed from a web socket connection and
I have a simple JSF line chart that uses PrimeFaces (via jqPlot) library: <p:lineChart
I have made a simple Line Chart: Which is showing 4 grid-lines at points
I have a simple chart with a Y and X axis, by default the
I have a very simple highcharts js chart, which has dates on x-axis and
I have implemented a simple D3.js line chart that can be zoomed and panned.
Let's say I have a simple line chart with 5 values (a = 155,
I have a simple serie plotted on a XY Line Chart as below public
I have a simple line chart that I've added data labels to: But I
I have a really simple line chart written using NVD3.js. I've written a simple

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.