Datagrapht with 2-D line and 3-D bars?

444
2
03-20-2013 02:10 PM
JoeMcCollum
New Contributor
I don't know if it's possible....it is in regular ArcMap. 

But I have my doubts it is possible in ArcObjects.
====================================================================
        Dim pdatagraph As IDataGraphT = New DataGraphTClass
        Dim seriesprops As ISeriesProperties = pdatagraph.AddSeries("bar:vertical")
        seriesprops.SourceData = pTable
        seriesprops.SetField(0, "YrMo")
        seriesprops.SetField(1, "Number")
       
        seriesprops = pdatagraph.AddSeries("line:vertical")
        seriesprops.SourceData = pTable
        seriesprops.SetField(1, "Prod") 
       
       pdatagraph.GeneralProperties.Show3D = True
       'This gets me 3D bars and a 3D line.

         pdatagraph.Update(Nothing)

        pdatagraph.ExportToFile("f:\states\graph.jpg")
==============================================================

I'll try it again tomorrow.
0 Kudos
2 Replies
JoeMcCollum
New Contributor
I've fought with it all day...perhaps it is not possible.

Other question:  how can I get the x-axis as character labels instead of numbers?  Are my labels too wide? 

     Dim pdatagraph As IDataGraphT = New DataGraphTClass
     Dim seriesprops As ISeriesProperties = pdatagraph.AddSeries("bar:vertical")
    seriesprops.SourceData = pTable

    seriesprops.SetField(0, "YrMo")
    seriesprops.SetField(1, "Number")

Instead of getting 2012_09 (or even 12_09) for my bar labels, I'm getting numbers....1 for the 1st bar, 2 for the 2nd, etc.
0 Kudos
JoeMcCollum
New Contributor
I figured it out...sort of....

Use seriesprops.LabelField - this puts the value of the bar and number of observations on the bar's mark also (not sure if that's a bug or a feature).
0 Kudos