PC Review


Reply
Thread Tools Rate Thread

Chart showing ranges of prices of different items?

 
 
Dream
Guest
Posts: n/a
 
      9th Jan 2010
Greetings,

I am trying to create a chart similar to the one available at the following
link:

http://earthtrends.wri.org/images/et...cost_small.jpg

It shows on the Y-axis different items. On the X-axis, the price in USD
0..1...2...3...4...5...6...7...and so on.

Than, for each product I need to plot its range of prices. For example, for
item 1, its price ranges from 3 to 5 dollar. so it should be a horizontal
line or bar extending from 3 to 5.

Could you please explain to me how to do it? By the way, Any idea what these
types of charts are called?

Thanks in advance,

 
Reply With Quote
 
 
 
 
Yves Dhondt
Guest
Posts: n/a
 
      9th Jan 2010
There might be better options but I would use a stacked bar chart and hide
the first data entry to get the offsets correct.

Consider the data to be in 1 column, e.g.

A1 : Ethanol from sugar cane (Brazil)
A2 : 3.0 <= open value
A3 : 0.8 <= difference between open and close value

B1 : Ethanol from corn (US)
B2 : 4.1
B3 : 2.7

Then just generate a stacked bar chart. You should get 2 items per series.
If you format the first item to have no border and no fill color, your chart
should look the way you want.

The following macro formats does the hiding automatically. You might have to
adjust the range in your case of course:

====================================
Sub OpenCloseChart()

' Create the chart and add the data.
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("'Sheet1'!$A$1:$B$3")
ActiveChart.ChartType = xlBarStacked

' Hide the first series.
ActiveChart.SeriesCollection(1).Select
Selection.Border.ColorIndex = xlColorIndexNone
Selection.Interior.ColorIndex = xlColorIndexNone

' Hide the legend
ActiveChart.SetElement (msoElementLegendNone)

' Set the X axis scale.
ActiveChart.Axes(xlValue).Select
ActiveChart.Axes(xlValue).MinimumScale = 0
ActiveChart.Axes(xlValue).MajorUnit = 1

End Sub

====================================

Yves

"Dream" <(E-Mail Removed)> wrote in message
news:746F6487-138D-4131-A4DB-(E-Mail Removed)...
> Greetings,
>
> I am trying to create a chart similar to the one available at the
> following
> link:
>
> http://earthtrends.wri.org/images/et...cost_small.jpg
>
> It shows on the Y-axis different items. On the X-axis, the price in USD
> 0..1...2...3...4...5...6...7...and so on.
>
> Than, for each product I need to plot its range of prices. For example,
> for
> item 1, its price ranges from 3 to 5 dollar. so it should be a horizontal
> line or bar extending from 3 to 5.
>
> Could you please explain to me how to do it? By the way, Any idea what
> these
> types of charts are called?
>
> Thanks in advance,
>


 
Reply With Quote
 
Dream
Guest
Posts: n/a
 
      13th Jan 2010
Thank you for your reply. It is very helpful.

"Yves Dhondt" wrote:

> There might be better options but I would use a stacked bar chart and hide
> the first data entry to get the offsets correct.
>
> Consider the data to be in 1 column, e.g.
>
> A1 : Ethanol from sugar cane (Brazil)
> A2 : 3.0 <= open value
> A3 : 0.8 <= difference between open and close value
>
> B1 : Ethanol from corn (US)
> B2 : 4.1
> B3 : 2.7
>
> Then just generate a stacked bar chart. You should get 2 items per series.
> If you format the first item to have no border and no fill color, your chart
> should look the way you want.
>
> The following macro formats does the hiding automatically. You might have to
> adjust the range in your case of course:
>
> ====================================
> Sub OpenCloseChart()
>
> ' Create the chart and add the data.
> ActiveSheet.Shapes.AddChart.Select
> ActiveChart.SetSourceData Source:=Range("'Sheet1'!$A$1:$B$3")
> ActiveChart.ChartType = xlBarStacked
>
> ' Hide the first series.
> ActiveChart.SeriesCollection(1).Select
> Selection.Border.ColorIndex = xlColorIndexNone
> Selection.Interior.ColorIndex = xlColorIndexNone
>
> ' Hide the legend
> ActiveChart.SetElement (msoElementLegendNone)
>
> ' Set the X axis scale.
> ActiveChart.Axes(xlValue).Select
> ActiveChart.Axes(xlValue).MinimumScale = 0
> ActiveChart.Axes(xlValue).MajorUnit = 1
>
> End Sub
>
> ====================================
>
> Yves
>
> "Dream" <(E-Mail Removed)> wrote in message
> news:746F6487-138D-4131-A4DB-(E-Mail Removed)...
> > Greetings,
> >
> > I am trying to create a chart similar to the one available at the
> > following
> > link:
> >
> > http://earthtrends.wri.org/images/et...cost_small.jpg
> >
> > It shows on the Y-axis different items. On the X-axis, the price in USD
> > 0..1...2...3...4...5...6...7...and so on.
> >
> > Than, for each product I need to plot its range of prices. For example,
> > for
> > item 1, its price ranges from 3 to 5 dollar. so it should be a horizontal
> > line or bar extending from 3 to 5.
> >
> > Could you please explain to me how to do it? By the way, Any idea what
> > these
> > types of charts are called?
> >
> > Thanks in advance,
> >

>
> .
>

 
Reply With Quote
 
kiwiangus
Guest
Posts: n/a
 
      15th Jan 2010
Hi Dream,
I recreated the chart as shown in the picture, but there are 2 tricks.
1. In one row (say row 2, we'll assume row 1 has the headings) display the
"Low" prices and then in another row (row 3) display the DIFFERENCE not the
"High" price. Eg. If a low price was $0.55 and the high $0.88, then show as
your "High" $0.33 i.e. the difference between the two prices. Now select the
information and create your chart using Horizontal Bars.

Trick 2:
Once you have created your chart, select Series 1 (the low figures),
right-click and select 'Format Data Series', then select 'No Fill' and 'No
Borders' and this series will disappear and the remaining information should
resemble what you are looking for. Well it did on my chart!

I don't know what this type of chart is called, but vertically it's called a
'Floating Chart' so I assume it's a something similar.

This is the first time I've responsed to a problem, so hope it works.
Cheers

"Dream" wrote:

> Thank you for your reply. It is very helpful.
>
> "Yves Dhondt" wrote:
>
> > There might be better options but I would use a stacked bar chart and hide
> > the first data entry to get the offsets correct.
> >
> > Consider the data to be in 1 column, e.g.
> >
> > A1 : Ethanol from sugar cane (Brazil)
> > A2 : 3.0 <= open value
> > A3 : 0.8 <= difference between open and close value
> >
> > B1 : Ethanol from corn (US)
> > B2 : 4.1
> > B3 : 2.7
> >
> > Then just generate a stacked bar chart. You should get 2 items per series.
> > If you format the first item to have no border and no fill color, your chart
> > should look the way you want.
> >
> > The following macro formats does the hiding automatically. You might have to
> > adjust the range in your case of course:
> >
> > ====================================
> > Sub OpenCloseChart()
> >
> > ' Create the chart and add the data.
> > ActiveSheet.Shapes.AddChart.Select
> > ActiveChart.SetSourceData Source:=Range("'Sheet1'!$A$1:$B$3")
> > ActiveChart.ChartType = xlBarStacked
> >
> > ' Hide the first series.
> > ActiveChart.SeriesCollection(1).Select
> > Selection.Border.ColorIndex = xlColorIndexNone
> > Selection.Interior.ColorIndex = xlColorIndexNone
> >
> > ' Hide the legend
> > ActiveChart.SetElement (msoElementLegendNone)
> >
> > ' Set the X axis scale.
> > ActiveChart.Axes(xlValue).Select
> > ActiveChart.Axes(xlValue).MinimumScale = 0
> > ActiveChart.Axes(xlValue).MajorUnit = 1
> >
> > End Sub
> >
> > ====================================
> >
> > Yves
> >
> > "Dream" <(E-Mail Removed)> wrote in message
> > news:746F6487-138D-4131-A4DB-(E-Mail Removed)...
> > > Greetings,
> > >
> > > I am trying to create a chart similar to the one available at the
> > > following
> > > link:
> > >
> > > http://earthtrends.wri.org/images/et...cost_small.jpg
> > >
> > > It shows on the Y-axis different items. On the X-axis, the price in USD
> > > 0..1...2...3...4...5...6...7...and so on.
> > >
> > > Than, for each product I need to plot its range of prices. For example,
> > > for
> > > item 1, its price ranges from 3 to 5 dollar. so it should be a horizontal
> > > line or bar extending from 3 to 5.
> > >
> > > Could you please explain to me how to do it? By the way, Any idea what
> > > these
> > > types of charts are called?
> > >
> > > Thanks in advance,
> > >

> >
> > .
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a chart showing ranges of prices of different produc Dream Microsoft Excel Misc 9 13th Jan 2010 06:26 AM
ranges not showing on chart =?Utf-8?B?TWljYXlsYSBCZXJnZW4=?= Microsoft Excel Charting 0 12th Aug 2005 01:02 AM
Showing two data ranges on one chart =?Utf-8?B?RGVuaXNlIEZyZWlidXJnZXI=?= Microsoft Excel Charting 1 12th Oct 2004 04:41 PM
Excel2000: Is it possible to use named ranges as chart's series ranges Arvi Laanemets Microsoft Excel Misc 8 11th Jul 2004 06:00 PM
Bond prices: summarize ranges from different worksheets bluebanker Microsoft Excel Programming 1 17th Oct 2003 03:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:41 PM.