Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

Automatic Bar/Pie Charts (with Data from SQLServer)

This is a discussion on Automatic Bar/Pie Charts (with Data from SQLServer) within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, with MP 2004 / VB.Net I generate a JPEG-File that shows our shop locations on a map. This works ...

  1. #1
    webjagger is offline Junior Member White Belt
    Join Date
    Mar 2004
    Posts
    10

    Automatic Bar/Pie Charts (with Data from SQLServer)

    Hi,

    with MP 2004 / VB.Net I generate a JPEG-File that shows our shop locations on a map. This works fine. Creating pushpinsets is also no problem - if this should be necessary.

    Where I haven't found a solution yet, is to show a bar/pie chart instead of every pushpin-symbol that illustrates e.g. sales data of the specific shop which are available in sqlserver. The problem is not to get the data from sqlserver but to show it at the locations on the map. Is it a property of the pushpins? Is it possible to map the already positioned pushpins with the sales data by the shop id, or have the adress data be read together with the sales data?

    Anybody has a sample code?

    Thanks in advance.

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    Here's the sample code for DisplayDataMap in the Help file.. this is a very versatile method, there's a lot in the documentation.

    Code:
      Sub CreateShadedAreaMapUsingMapPointDemographics()
        Dim objApp As New MapPoint.Application
        Dim objDataSet As MapPoint.DataSet
        Dim objDataMap As MapPoint.DataMap
        Dim objField As MapPoint.Field
    
        'Set up application and objects to use
        objApp.Visible = True
        objApp.UserControl = True
        Set objDataSet = objApp.ActiveMap.DataSets.GetDemographics()
        Set objField = objDataSet.Fields("Households (1980)")
    
        'Create the data map, and give it a name
        Set objDataMap = _
          objDataSet.DisplayDataMap(geoDataMapTypeShadedArea, _
          objField, geoShowByRegion1, geoCombineByDefault, _
          geoRangeTypeDiscreteEqualRanges, geoRangeOrderDefault, 15)
        objDataMap.LegendTitle = "State Households"
      End Sub
    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    webjagger is offline Junior Member White Belt
    Join Date
    Mar 2004
    Posts
    10
    ... thank you eric, i've also found that, but what i did not find is how to get my data from e.g. a recordset (containing street, zip code, city and sales amount) into the ActiveMap.DataSets and then make sure all records are getting displayed -> because of multiple matches with the adress information.

    any solution for that or is there another way?

  4. #4
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    What I would recommend is putting a lat/lon on each of your records first and store this in the database. Then map by lat/lon instead of address. Does this help?

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help Please!!! With Mapping information to pie charts
    By DCM in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 12-16-2005, 10:33 AM
  2. How can I change charts size?
    By julior in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-12-2004, 05:22 AM
  3. Automatic Zip Code
    By tak_ibi in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-11-2003, 05:29 PM
  4. UDL to SQLServer doesn't work (C#)
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-03-2003, 06:50 AM
  5. how to reset the automatic zoom function
    By nglovier in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-05-2002, 02:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27