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 6055837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:18:32+00:00 2026-05-23T08:18:32+00:00

My objective : return coordinates and shapes so that I can roll my own

  • 0

My objective: return coordinates and shapes so that I can roll my own custom hover text to a .NET Charting image. This would be no problem if I were using the ASP.NET control (which renders both an image tag and an HTML <map> tag; however, I’m in the MVC world so I’m returning the chart as a binary image. Here’s the gist:

public virtual FileStreamResult Chart()
{
    //Set up chart
    Chart Chart1 = new Chart();
    Chart1.RenderType = RenderType.ImageTag;

    Chart1.ChartAreas.Add(new ChartArea("First"));

    //Add some lovely data
    Series s = new Series();
    s.Name = "Tasks";
    s.Points.AddXY("Task 1", 5, 8);
    s.ChartArea = "First";
    s.ChartType = SeriesChartType.RangeBar;

    //Add a tooltip - This **should** make the MapAreas collection populate.
    s.ToolTip = "Hello World";

    Chart1.Series.Add(s);

    if (Chart1.MapAreas.Count == 0)
        CryRiver(); //Always executed. :*(

    //Output image as FileStreamResult
    //...
}

The Problem: No matter what I do, I cannot get the MapAreas collection to contain anything. I believe this to be because the coordinates don’t get populated until the image actually renders.

How do I get at the coordinates of the map areas for the charted data when rendering an image as binary?

Thanks!

  • 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-05-23T08:18:33+00:00Added an answer on May 23, 2026 at 8:18 am

    Found an answer; not sure if it’s the best one.

    One must call Chart1.RenderControl(); before the Chart1.MapAreas gets populated.

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

Sidebar

Related Questions

In Objective-C, I usually see methods that return a dynamically typed object defined as
How can i convert int64_t to NSInteger in Objective-C ? This method returns into
In objective-c manual it is written that something like return [[[SomeClass alloc] init] autorelease];
In objective-C I often see functions that don't return anything declared as: - (void)myFunction
Objective : Make a progress bar where users can check how much of a
Objective: In support of a Windows Service that may have multiple instances on a
I am trying to map the coordinates of the following JSON text on a
I wrote this following Objective-C code as part of Stanford's iTunes U course on
Block variable in objective-c is a reference and I learned from somewhere infer that
What is the meaning of return statement in Objective-C>? For example, a simple calculator

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.