is it possible to create dojo chart without axis? - charts

I'm using a dojo chart to display data in a bubble chart. However, I don't need the axis but if I remove the axis, it screws up the display of the data. I can fudge axis not being there by hiding labels and coloring the lines white but then there's still this large margin on the left and bottom of the chart. How do you make a dojo chart without the axis while still having the min/max set correctly?

chart1.addAxis("x",{ type : 'Invisible' /*, .... */ });

Matthew, if you are still looking to tweak the margins, the solution here:
dojox charting: remove the padding around the chart
worked for me.

Related

Round y-axis values: Dojo Chart vs Chart.js

I am using Dojo Charts to create some line graphs, and this is how the chart looks,
this id chartData: 0,0,0,0,65,223
And when I create the graph using Chart.js, this is how it is rendered
Ignore the x-axis and other things, If we look at the y-axis, the values are rounded in chart.js, looks much nicer when compared to dojo charts.
Is there an option to achieve the same in dojo charts?
Try adjusting majorTickStep, or optionally also set minorTickMarks to true and adjust minorTickStep as well.
See http://dojotoolkit.org/reference-guide/1.10/dojox/charting.html#enabling-and-disabling-tick-marks and "Axis Stepping" two sections later.

Horizontal aligning of nvd3 legends

I have an nvd3 pie chart like the one given below:
As you can see,the legends are automatically aligned vertically. If the numerical values doesnt reach higher numbers the legends would be placed horizontally.
What I need is to place all the legends horizontally,no matter what the values in the numerical fields are.
Can anybody help me on this?

how can I move yAxis labels from Right of chart to left of chart in highstock

how can I move yAxis labels from Right of chart to left of chart in highstock.
Here is a jsfiddle example in which we have labels like Fresh Breeze on the right side of chart which I want it on the left.
In the previous version of Highstock it is was on left by default.
I have also tried the property align:left inside the yAxis options but it does not give the desired result.
Thanks
You don't want to set align:left at the axis level, you need to use it on the plotband label level.
The code in that example is explicitly telling the chart to align the plot band labels to the right, and push them an extra 40 pixels right as well.
Change that to align:left, and x:0
(or, just don't set the align or x properties at all, and by default the labels will be on the left, as they've always been...)
example:
http://jsfiddle.net/jlbriggs/LKtpc/28/
{{EDIT:
Your original question referenced the plotband labels in highcharts...
But it seems your question is really about the y axis placement in Highstock.
To move it to the left, you need to add this:
yAxis: {
opposite:false
}
as Highstock sets the axis to opposite:true by default.
Example:
http://jsfiddle.net/aayajgLe/1/
In order to put your yAxis label to the left side, just set yAxis' opposite property to false.
yAxis: {
opposite: false
}
It seems not intuitive, though.

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