Flot: specify bar width for a single bar - flot

Im using flotchart to create a merged graph with lines and bars the graph is working properly but when i filter the graph by years there is just one x-axis and the bar fills the entire graphic. If i have more than one x-axis i don't have any problem.
I tried to change the barWidth property but if i put barWidth : 0 the graphic stop filling but i get a extremely fine line to every bar... I just want to get a normal bar even with one x-axis.
Thanks!

Related

Cognos bar chart second axis bars overlapping the first axis bars

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

Moving the x-axis / chart to the right in MS Excel

In MS Excel 2010, I have the following data. I created a simple line chart but it uses the data axis automatically (that's what I want). The problem is that the first date (11/25/2015) is right below 0% (of the y-axis) and I don't want that to happen. I want to move the middle area of the chart along with the x-axis a bit to the right so that it doesn't look shabby. How to go about doing this?
I added a new row and then deleted it but the chart automatically adjusts by itself. I have also tried simply resizing the chart. I've also tried creating new rows but I don't know if that's the right way.
Chart Example
select your X axis and right click on it and then select Format Axis from the pop up menu.
in the options screen that comes up on the right you can set your MAX and MIN values so your chart does not resize on you at all or you can limit how much it can resize in one direction. You can also set where the AXIS crosses. now this will apply to where the Y axis crosses.
This information can be set for the Y axis as well by selecting it and repeating this process. When you do it for the Y axis, you are controlling where the X axis will cross.

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.

Excel: Z-Order of Series in Chart and Legend

I have a combo chart in excel, with clustered bar charts (for a box plot) and lines. I am trying to display the bar charts/box plot in front of the lines, but am able to do so.
I tried moving the bar charts to the top and/or bottom in "select data" - but no change.
Any suggestions?
Am using Excel 2013.
Thanks!
I believe it is not possible. You can change display ordering of Excel series by:
changing the plot order of the series (this is what you have done in the "Select data" dialog),
changing the axis on which the series are displayed (series on secondary axis are displayed over the series on the primary axis).
But from my experiments no combination of changes makes the lines appear behind the columns.
There are two workarounds that might or might not help you:
you can create two charts on top of each other and put the chart with the lines behind the one with the columns,
or you could create a line chart (most likely you would need scatter chart), that is not a single line but a series of segments where the columns are not shown (this one is not that easy to do)
What are the lines for? If you are just trying to identify some zones along the value axis, you could instead use stacked areas, which would give a banded appearance. Areas are always drawn behind bars and columns, while lines are always drawn in front of lines and columns.

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