LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Scale my excel chart

Hi everybody,
I'm newbie in c# and I'm having trouble in creating an excel chart.
I have vector of data that my program calculated.
It's in the next format:
X Y
0.1 100
0.2 90
0.3 80
etc.

I assisted the article "How to automate Microsoft Excel from Microsoft
Visual C# .NET" and some other articles and was able to load this
values to the excel sheet. the X values inserted to A column and the Y
to B column.
My goal is to generate 2 different charts (xlXYScatterSmooth AND
xl3DColumn).

I have 2 problems -
1. The Scatter chart didn't work at all. I got exception on the
ChartWizard line.
the code was:
oRange = oSheet.get_Range("B2:B12", Missing.Value );
oChart.ChartWizard( oRange , Excel.XlChartType.xlXYScatterSmooth ,
Missing.Value,
Excel.XlRowCol.xlColumns, Missing.Value, Missing.Value,
Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value );


2. When I generated the xl3DColumn chart it worked fine BUT the scale
of the x axis was [0, 1] so I got graph with Y value = 100 and not
scaling at all.
I want my x axis will be [0.1 , 1]. How can I force the chart to use
the A column as it's scale?
The code is the same with one different - in the ChartWizard it's
xl3DColumn and not xlXYScatterSmooth .

Thank you very much
Dave
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - why use a logarithmic scale in a chart? Polly Charts and Charting in Excel 2 April 9th 10 05:22 PM
Dynamically Scale Gantt Chart Time Scale Andrew Lavinsky Charts and Charting in Excel 2 January 31st 10 12:51 PM
set scale in an excel chart pdfrone Excel Programming 1 March 1st 07 12:06 PM
Excel Rejects Chart Scale Changes Wynn Charts and Charting in Excel 2 December 10th 04 04:43 AM
Excel chart, right scale Richard[_13_] Excel Programming 2 October 3rd 03 09:29 PM


All times are GMT +1. The time now is 04:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"