CPBarPlot Width/Spacing - iphone

I am modifying the width of bars in a graph by using (CPBarPlot *)barPlot.barWidth, but the spacing between bars does not change and they now overlap each other. barPlot.barOffset works great for the initial offset, but I haven't been able to figure out how to change the spacing between subsequent bars. It seems like I have to change something with the spacing of intervals on the axis, but I don't see anything related to interval spacing in CPBarPlot. Anyone know how this can be accomplished?

Here's a post that might help out with this issue: http://mela.ertale.com/blog/?p=193
Good luck!

Related

ios-charts - problems using autoScaleMinMaxEnabled

I try to auto scale the y-axis for an LineChart. If I set the option autoScaleMinMaxEnabled, followed by an notifyDataSetChanged no auto scale occurs.
Also toggeling autoScaleMinMaxEnabled in ChartsDemo seems not to work. Is there a special trick?
Many thanks! - Tino
The "trick" is that min/max of the Y-axis is determined dynamically, during scrolling, depending on the y-values that are contained in the visible x-range.
If you want to see it working in the demo, then zoom in, enable autoScaleMinMaxEnabled, and then scroll to the right. Watch the Y-axis.

Matlab Increase thickness of lines of 3d bars

I have a 3D bar chart. Let me clarify, I do not want to edit the width of the bar graph as I have already done that. However, there are black lines that outline each bar. Is there a way to make these thicker?
Everything I have search pays reference to the width of the bars themselves, not the black lines enclosing them.
At last, I found the answer to my own question the minute after I ask it.
Simply:
set(j,'LineWidth',1.5)
EDIT: As Luis mentioned, j is the handle such that j = bar3(...)
Sorry should have included that.

Sigmaplot: How to scale x-axis for correctly displaying boxplots

I want to display overlapping boxplots using Sigmaplot 12. When I choose the scale for the x-axis as linear then the boxes do indeed overlap but are much too thin. See figure below. Of course they should be much wider.
When I choose the scale of the x-axis to be "category", then the boxes have the right width, but are arranged along each single x-value.
I want the position as in figure 1 and the width as in figure 2. I tried to resize the box in figure 1 but when I choose 100% in "bar width" than it still looks like Figure 1.
many thanks!
okay, I found the answer myself. In Sigmaplot, there is often the need to prepare "style"-columns, for example if you want to color your barcharts, you need a column that holds the specific color names.
For my boxplot example I needed a column that has the values for "width". These had to be quite large (2000) in order to have an effect. Why ? I have no idea. First I thought it would be because of the latitude values and that the program interprets the point as "1.000"s, but when I changed to values without decimals, it didnĀ“t get better.
Well, here is the result in color.
Have fun !

asp.net charts: Legend overlapping with X-axis

I am creating a Chart (DataVisualization.Charting.Chart) programmatically, which is a Stacked Bar chart.
I am also adding Legend entries programmatically to it. I want to show the Legend at the bottom of the chart.
But, while doing so, the Legend overlapps with the X-axis of the chart.
Here is the code I am using:
Private Function GetLegend(ByVal legendName As String, ByVal s As Single) As System.Windows.Forms.DataVisualization.Charting.Legend
Dim objLegend As System.Windows.Forms.DataVisualization.Charting.Legend = New System.Windows.Forms.DataVisualization.Charting.Legend()
objLegend.Name = legendName
objLegend.Font = New System.Drawing.Font("Verdana", s)
objLegend.IsDockedInsideChartArea = False
objLegend.Docking = Docking.Bottom
Return objLegend
End Function
Below statement adds that Legend to the chart
_msChart.Legends.Add(GetLegend("SomeValue1", 10.0F))
Any idea, what is missing? I want to show the legend at the bottom only, but it should not overlapp with the X-axis.
I had the same problem today. Try adding:
objLegend.Position.Auto = true
objLegend.DockedToChartArea = "yourChartAreaName"
That did not help me but I found on the net that this might be helpful (and clean solution).
What actually worked for me was moving chart area to make space for legend so it no longer overlaps. My legend was on top so this code worked for me:
chart.ChartAreas[0].Position.Y = 15
You can try resizing it instead, forcing it to be for example 20 pixels shorter than chart.Size.
Hope this helps.
I had an overlapping legend/chart area problem as well but none of the other suggestions here seemed to make any difference. I think the problem stems from legend text wrapping to two lines and the sizing algorithms not taking account of this.
The ideas here got me thinking more clearly about the problem though, and I was able control the size and position of the chart area using the following.
Chart1.ChartAreas[0].InnerPlotPosition = new ElementPosition(15, 5, 90, 75);
There's not much intellisense on those parameters, but as well as I could deduce, the parameters are all percentages of the total chart area (I initially thought they might be pixel values and got some very odd results). So what I've written above would set the plot area to start at 15% in from the left edge of the chart image and 5% down from the top, and have a width of 90% and a height of 75%.

how to set custom interval to horizontal axis in Flex Charts

I am trying to set custom step (interval) to my Line Chart's horizontal axis.
The chart gets its data from a grid. The grid has a lot of data and it is displayed accurately but because there are so many data points the horizontal axis is screwed up. I wanted to set a step on horizontal axis so that you get an idea when you see the graph without hovering the mouse on a data point!
thanks for any help!
-Ali
Flexi Comment Box
heylo people!
I have solved the mystery!!!
just add a horrizontalAxisRenderers to your Chart
and set the property canDropLabels to true!
<mx:horizontalAxisRenderers>
<mx:AxisRenderer axis="{horiAxis_B}" canDropLabels="true"/>
</mx:horizontalAxisRenderers>
axis being the name of the axis
you are done!!
but if you still have questions, you can always contact me here:
Alimsyed.com