Cognos bar chart second axis bars overlapping the first axis bars - cognos

When using Cognos 10 report studio creating a bar chart results in Overlapping Bars. How can i seperate them so they look like this (i.e. stacked vertically)

You could use a combination chart but by default your series will overlap. One workaround is to reduce the size of the bar width of your secondary axis.
I would also be interested to know how to overcome the default overlapping of clustered and stacked combination

Related

Can't align x-axis on hybrid scatter/area chart

Please have a look at This Excel chart. Here is a screenshot:
Here is the data:
There is a scatter series of blue of dots (plus a trendline) and a green area series. The chart data are contained within the series.
The problem I have is that the x-axis values of the two series are not aligned. For example, the second and third blue dots at x = 3.1 and x = 3.8 are in the correct place along the x-axis, but in the green area series they appear to be above x = 2.0 and x = 3.3. How to fix this?
Change the Scatter to a Line Chart, then format Line Color so that there is "No Line". Add trendline.
There may be another way to do this while retaining the Scatterplot, I'm not sure, but this seems to be visually what you're looking for, but I think you will need to use a Line Chart for this unfortunately. The problem is summarized in this similar Q on SuperUser:
https://superuser.com/questions/964264/aligning-stacked-bar-chart-w-scatter-plot-data
The short answer is that your combining (unsuccessfully) a categorical series (the columns) with interval/ratio series (the line charts). So, Excel doesn't know how to plot your categories (columns) on an interval scale (the current X axis).
You can verify this by selecting Chart > Layout > Axes > Secondary Horizontal Axis > More Secondary Horizontal Axis Options. Without making any changes to the axes configuration, the second X-axis will now appear along the bottom of the chart, and you can see it is scaled differently from your Scatter data.
I.e., in the Scatter series, the data is X/Y pairs. But in your Area chart, it treats the X-values as categorical, and in this context "1.1" is no different than "Bob" -- it is a cardinal representation of the data rather than an ordinal representation.
The problem I have is that the x-axis values of the two series are not aligned.
So even though the two series appear to share the same set of X-Values, the Chart is simply incapable of treating those as the same type of data. The x-axes are not aligned because they are not the same data or even the same type of data!
All that said, if you change both series to XY Scatter, it is possible (with some extraordinary effort) to apply shading/coloring below a series or between two series, etc.
http://peltiertech.com/fill-under-between-series-in-excel-chart/
http://chandoo.org/wp/2013/02/13/shaded-line-charts-excel/
What you can do is plot the Area graph on a secondary axis. Then go to Chart -> Layout -> Axes -> Display Secondary Horizontal Axis to see the axis, right click for its properties and change the type of the Axis Type to "Date axis". This (kind of) changes the axis to a numerical type, as opposed to a category type.
However, the area graph will still be placed incorrectly too far to the right because Excel will continue to plot the series as a (kind of) category type, with its data points appearing in the centre of each category as opposed to at the correct x value like in an XY scatter plot.
To get the graphs overlaying the most correctly, you can create a Scaled-up x value series which is, say, 1,000 times the original x-values and use this for the x-values of the area plot. By scaling by 1,000 or 10,000, you eventually get the granularity to a point where it looks more like X-Y plot, but is actually an area plot, and the graphs look like they coincide perfectly.

Creating a histogram with numerical x-axis in excel

I would like to create a bar-chart (or a histogram?) with vertical bars and a numerical x-axis , but I do not know how/where to start. I have MS-Excel and Origin-plot available with me. My intended chart would look like this:
You can more or less get what you want by adding and styling error bars appropriately to a scatter plot. The error bar is a simple way to force Excel to draw a line under/over the point.
Chart with data and error bars
Couple steps
Make an XY scatter chart
Add the error bars and delete the horizontal ones that come up
Set the negative error bar for the points to be equal to the same value that is being plotted
Set the positive error bar to 0 so it does not show
Change the formatting on the error bar to be thicker
Possible hide the initial dot shown so that it is bar only
You could take these steps and codify them with some VBA to prevent the tedious nature of doing this multiple times. Setting error bars is one of the worst activities to have to do continually.
I believe you should also be able to get your desired colors by adding multiple series. Possibly all the more reason to do this with VBA.

How to show one stacked bar and one non-stacked bar in a single bar chart in Google spreadsheets or Excel?

I have 2 sets of Data from the same time period mapped to bar charts like this:
Is there a way to show both these charts on the same graph side-by-side ?
You can plot one set on the primary y axis and and the other on the secondary y axis. You can assign the option to do this by opening the format box for the series.

Excel curve (Showing values at both sides of y-axis)

I have created a curve in Excel 2013.
At the Y-Axis I am showing some values that show the probability for survival for each 100.000 citizen. Now my problem is, that I want to also show it in percentage, at the right side of the Y-Axis.
How do I do this?
Thanks in advance.
Ps. I have added an the curve as an image, so that you can see how it looks at the moment.
Add a secondary (Y) axis:
Create a combo chart with a secondary axis
When the numbers in a chart you created vary widely from data series to data series, or when you have mixed types of data (for example, price and volume), you can plot one or more data series on a secondary vertical (value) axis. The scale of the secondary vertical axis shows the values for the associated data series. A secondary axis works well in a chart that shows a combination of column and line charts.
Combo chart with secondary axis
In Microsoft Excel 2013, you can quickly show a chart like the one above by changing your chart to a combo chart.
Click anywhere in the chart you want to change to a combo chart to show the Chart Tools.
Chart Tools
Click Design > Change Chart Type.
Type group on the Design tab
On the All Charts tab, choose Combo, and then pick the Clustered Column - Line on Secondary Axis chart.
Combo chart with secondary axis on All Charts tab
Under Choose the chart type and axis for your data series, check the Secondary Axis box for each data series you want to plot on the secondary axis, and then change their chart type to Line.
Make sure that all other data series are shown as Clustered Column.
To clarify what is plotted on each of the vertical axes, you can add axis titles.
.
If I understood you correctly, you only need a right axis that shows a percentage scale, with, e.g., the tick mark for 100% at the same level as the tick mark for 100000 on the left axis.
You do not need any additional curves.
Then, you need to:
Create some dummy data. You may use two cells, which will give you a series with a single data point. Use 10 (X range) and -1 (Y range). Depending on the options you selected for your y axis, you may have to set the Minimum value fixed at 0 (you can do this now or later).
Add it to the plot.
Assign it to a secondary y-axis. Right-click on the series, Format Data Series -> Series Options -> Secondary Axis. Or, if you find it difficult to select it this way, select the chart, Go to Format, select the series from the pull-down menu on the top left, and Format Selection.
Format the right axis scale to give you a correct matching with the left scale. Right click on the secondary y axis, set the Minimum fixed at 0, the Maximum fixed at 1.2 (to match the figure you posted), and the number format as Percentage. PS: there will be a tick label "120%" on the right axis. That will not look good for what you are plotting. It will be best to set the Maximum of the left axis to 115000 (say), and the right axis to 1.15 then.

Which is the best way to plot graph in iphone?

I saw some Core-plot sample. Is there anything equivalent that will do my task easily? I also want to know feasibility with Core-plot in iPhone. (any issues with core-plot)
I want to have multi-colored vertical bar chart. Is it possible to customize Core-plot framework. Using only one barplot can we have multiple segment on it.
Thank you.
Naveen Thunga
To make a stacked bar plot, you need to make multiple plots, one for each segment. On all but the bottom plot, set barBasesVary to YES. The datasource will ask for a third field called CPTBarPlotFieldBarBase which is the base value for the bar. You will have to do the stacking calculations yourself.
The horizontal lines can be drawn using an additional bar plot. Give the bars a short height (tip - base). You can make the width wider than the others if you want--each plot is independent.
The space between the bars depends on several factors. By default, bar widths are specified in data coordinates. For example, if the bar locations are one unit apart, a bar width of 0.5 will make the bar width and the space between the bars equal; a bar width of 0.75 will make the space 1/3 of the bar width. The actual width in pixels depends on the size of the graph and how many bars are visible (determined by the plot range along that axis). If barWidthsAreInViewCoordinates is YES, then bar widths are given in pixels which keeps them the same apparent width as the plot range changes, but the space between them will change with the plot range.

Resources