473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Excel Charts

2
Hi, does anybody know how to set a title to a chart created from vb
here's my code
Expand|Select|Wrap|Line Numbers
  1. ....
  2.         Dim graficos As Excel.ChartObjects = CType(hoja1.ChartObjects(), Excel.ChartObjects)
  3.  
  4.         Dim objgrafico As Excel.ChartObject = graficos.Add(100, 50, 500, 300)
  5.         Dim grafico As Excel.Chart = objgrafico.Chart
  6.  
  7.         grafico.ChartType = Excel.XlChartType.xl3DPie
  8.         Dim rango As Excel.Range
  9.         rango = hoja1.Range(hoja1.Cells(2, 1), hoja1.Cells(ret(0).Count + 1, 2))
  10.         grafico.SetSourceData(Source:=rango, PlotBy:=Excel.XlRowCol.xlColumns)
  11.  
also it would be helpful if somebody could tell me how to show the legendkeys and the values of the chart

thx
meee
Aug 10 '07 #1
2 1284
hi
U can do following steps
chartobject.Axes(xlValue).AxisTitle.Select
chartobject.Axes(xlValue).AxisTitle.Text = yAxis

same for xaxis
chartobject.ChartTitle.Text = charttitle

Priti


Hi, does anybody know how to set a title to a chart created from vb
here's my code
Expand|Select|Wrap|Line Numbers
  1. ....
  2.         Dim graficos As Excel.ChartObjects = CType(hoja1.ChartObjects(), Excel.ChartObjects)
  3.  
  4.         Dim objgrafico As Excel.ChartObject = graficos.Add(100, 50, 500, 300)
  5.         Dim grafico As Excel.Chart = objgrafico.Chart
  6.  
  7.         grafico.ChartType = Excel.XlChartType.xl3DPie
  8.         Dim rango As Excel.Range
  9.         rango = hoja1.Range(hoja1.Cells(2, 1), hoja1.Cells(ret(0).Count + 1, 2))
  10.         grafico.SetSourceData(Source:=rango, PlotBy:=Excel.XlRowCol.xlColumns)
  11.  
also it would be helpful if somebody could tell me how to show the legendkeys and the values of the chart

thx
meee
Aug 13 '07 #2
zer0gg
2
thx Priti, i tried
Expand|Select|Wrap|Line Numbers
  1. chartobject.ChartTitle.Text = charttitle
but it seems it just a read property, any other idea???

zer0gg

hi
U can do following steps
chartobject.Axes(xlValue).AxisTitle.Select
chartobject.Axes(xlValue).AxisTitle.Text = yAxis

same for xaxis
chartobject.ChartTitle.Text = charttitle

Priti
Aug 14 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ian castleden | last post by:
From time to time I see requests for some sort of python MS Excel interface/software. I have written just such software 100% python (works with Jython too! at least it did a year ago). It was...
0
by: mscir | last post by:
Date: Thu, 08 Jul 2004 17:02:27 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <10ero4l3kp2qa65@corp.supernews.com> Reply-To: mscir@usa.com User-Agent: Mozilla/5.0...
10
by: Mark Day | last post by:
Hi All, I am using Access 2000 to generate over 40 Excel charts and pivot tables using early binding to the Excel 9.0 object library. I am finding that if I show the Excel object while processing...
0
by: Rach | last post by:
Hi, Does anyone know how to export charts/graphs from EXCEl into Powerpoint-Microsoft Charts though VBA code. I would like to import the underlying data with the chart as well. I know we can...
1
by: Randall Arnold | last post by:
I'm converting a vbscript program to vb.net. Witht he exception of .net idiosyncrasies, most of it is working well with the same code. My only problem is that some properties and methods are...
5
by: Takeadoe | last post by:
I'm doubtful that the group is unbiased, but I will ask anyhow :o). If one intends to plot lots of data, primarily XY line and scatter plots, and mass produce them (in many cases I will be doing...
3
by: implicate_order | last post by:
Greetings, I'm new to python and am in the process of writing a script to parse some CSV data, spread it across multiple Excel worksheets and then generate charts. I searched the internet to...
3
by: saragoesnuts | last post by:
I have a program that automates to Excel with information in tables. I want to add charts to the excel file (pie charts, bar charts, etc). Is this possible?
0
by: eolmos | last post by:
Hello everyone, I am currently working on a project that requires a webform in asp.net using C# as the code behind. The page must allow the user to create a report in excel. This report must also...
9
by: AGP | last post by:
I have a VB6 application that has an OLE container with an embedded Excel chart. Our office updated to Excel 2007 and now although the app works the charts looks like crap. Since the app is fairly...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.