Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have the following data: 2

Status
Not open for further replies.

DavidMathew

IS-IT--Management
Joined
Mar 16, 2003
Messages
1
Location
GB
I have the following data:
Self score Other's score

Quality1 3.8 3.2
Quality2 4.1 4.4
Quality3 3.2 3.7
Quality4 2.9 3.1
Quality5 4.2 3.5
Quality6 4.1 4.0

I want to plot "Other's score" as a set of six bars (ie Quality 1 to 6) with "Self score" as a marker (eg an "x") within the bar at the appropriate point. In other words, like doing a column-line chart combination, but transposing the axes.

Alternatively, just knowing how to plot a line chart that plots down the page, rather than across it, would help.
Thanks.
 
this doesn't give u eggs-atly what u r lookin' for but it's close

add two columns between self and other. (columns C & D), in cell C2 (assuming row 1 has labels) enter the formula
=B2-0.05
in D2, d3 etc enter 0.05

insert rows between Quality 1 and Quality 2, Quality 2 and Quality 3 etc.

with the data u have given, this would the data take up A1:E13

Highlight A1:a13; hold the control key and highlight C1:E13

plot ur bar chart.

in the chart right click on the series in column C, under axis, choose secondary axis, next choose the series with 0.05 and make that secndary axis as well. make sure the axis are identical in scale, else change one to suite the other.

right click on one of the series that are together and choose chart type and choose stacked bar chart.

in the stacked bar chart choose the larger series and right click, under patterns choose none for border and area.

delete cell E2 and move cells up.

u can get rid of the second axis by formatting it if u wish


never iron ur four leaf clover, u don't wanna press ur luck
 
missed an important step, corection below:

insert rows between Quality 1 and Quality 2, Quality 2 and Quality 3 etc. activate cell E2, insert, cell and move down the cells below.

with the data u have given, this would the data take up A1:E13
 
The following as a Word doc can be found at:

This has been done in Access2002 /Excel2002.

Vertical line plot in Access:

With your table:
DavidMathew
Quality SelfScore OthersScore
1 3.8 3.2
2 4.1 4.4
3 3.2 3.7
4 2.9 3.1
5 4.2 3.5
6 4.1 4

Create a query (I called it qualitycalc2)

SELECT [Quality]-0.5 AS quality2, DavidMathew.SelfScore
FROM DavidMathew;

qualitycalc2
quality2 SelfScore
0.5 3.8
1.5 4.1
2.5 3.2
3.5 2.9
4.5 4.2
5.5 4.1

The reason why the calculation Quality-0.5 is used is to center your data points on the plot where your bar chart bars will be located – see the Excel figure at the end.
Create a blank report in design view

From the toolbox, select the chart object, and draw a chart on the detail section

On the wizard, select the query we just made
On the next page of the wizard select both fields for the chart
Next select XY scatter chart
Next drag the self score to the series box, and double click the summarize box where SumOfQuality2 is showing. On the popup select none for summarize Quality2 by. Click preview chart and your vertical line chart will be shown, as you want to see it.
Next and finish, and the preview is rubbish! – your data points in a vertical line over point 1, not like the preview at all! All is not lost:
Return to design view and doubleclick the chart, then right click somewhere on the blank area outside the plot. Select chart options. Label the X axis values selfscore
Label the Y axis quality, and do any other labelling you require. Finally, with the chart still selected, go to Data, Series in columns, and select it.

Note that the Access sample data is still showing on the chart object. This is a lousy bug, typical of Microsoft. The OLE hooks to MS Graph in Access have always been far inferior to those in Excel, where it is fairly usable. After some more work, opening and closing the database, sometimes, the data you want to see will appear in the chart design window instead of the sample data. Until it does, you are limited with how much you can customize the graph.

------Screen dump of access report--------

Well, your vertical line plot is now working, as a preview will show.
However, It seems that what you want to do in Access is not possible.
The next thing is to get that overlayed with a bar graph of the othersscore against the quality values on a secondary axis. Access tells me that I cannot combine different chart types - I can do it in Excel (see below), so why is it not is it possible in Access? Dunno!

To do this in Excel:

To break down the steps in Excel, lets do each chart separately at first to avoid confusion:

Create the following table:
A B C D
1 Quality self Quality-0.5 others
2 1 3.8 0.5 3.2
3 2 4.1 1.5 4.4
4 3 3.2 2.5 3.7
5 4 2.9 3.5 3.1
6 5 4.2 4.5 3.5
7 6 4.1 5.5 4

where C2 contains the formula =A2-0.5, and then select C2:C7 and fill down (Ctrl D) to calculate all the values in that column.

For the bar graph of Self vs. Quality:
Select A1:B7

Click on the chart wizard tool

And select the XY (scatter) plot and then next, next, next, finish:

------interim plot here----------

Right-click on the white area away from the plot and select chart type
Select Bar and then Ok for the finished bar chart:

-------bar chart here--------

Note that the bars align halfway below each Y scale point. This is the reason for the Quality-0.5 scale following:

For the point plot of Others vs. Quality-0.5:

Select C1:D7
Click on the chart wizard tool
And select the XY (scatter) plot and then next
Click the series tab
Change the X Values: =Sheet1!$C$2:$C$7
to =Sheet1!$D$2:$D$17 ,
and the Y Values from =Sheet1!$D$2:$D$7
to =Sheet1!$C$2:$C$7 then next, next and finish:
Here is the horizontal dot plot with the points aligned:

-------dot plot here--------


Now for the tricky one, both together:
Select A1 to D7
Click on the chart wizard tool
And select the XY (scatter) plot and then next
Click the series tab, and in the Series box select the quality-0.5 and remove. Click on self in that box, and change the the X Values to =Sheet1!$D$2:$D$7 , and the Y Values to =Sheet1!$C$2:$C$7 then next, next and finish:

-----interim combination plot here-------

Nearly there! Click on one of the others series points on the chart to select the series, then right-click that point and select chart type and bar chart and Ok:

------final combi plot here--------

You can experiment with customizing the chart to make it look the way you want.

According to Excel help
Add your own custom chart type to apply to other charts
1. Click the chart you want to save as a custom chart type.
2. On the Chart menu, click Chart Type.
3. On the Custom Types tab, click User-defined.
4. Click Add.
5. In the Name box, type a name.
6. If you want to add a description, type it in the Description box.
7. Click OK.

However, I have had no success with this
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top