I Want to Show Mean, Median and Standard Deviation in chart area in case of Box Plot.Since Custom Legend tool is not avaiable taught of using Extra Legend tool.
The problem is that I am not able to Position the extra legend in blank space after my bottom Axis.Can anyone help me in this.
I think your problem is produced because you need repaint the Chart, before try to calculate the custom position the ExtraLegend Tool. You can do something similar as I do in next simple code, where I have drawn a ExtraLegend Tool align to original Legend:
Private Sub Form_Load()
TChart1.AddSeries scBox
TChart1.AddSeries scBox
TChart1.Series(0).FillSampleValues 5
TChart1.Series(1).FillSampleValues 5
TChart1.Legend.LegendStyle = lsValues
TChart1.Series(0).asBoxPlot.Box.Brush.Color = vbRed
TChart1.Series(1).asBoxPlot.Box.Brush.Color = vbBlue
TChart1.Tools.Add tcExtraLegend
TChart1.Tools.Items(0).asExtraLegend.Series = TChart1.Series(1)
'Use internal Repaint to calculate the position of Legend.
TChart1.Environment.InternalRepaint
With TChart1.Tools.Items(0).asExtraLegend.Legend
.CustomPosition = True
.Left = TChart1.Legend.Left
.Top = TChart1.Legend.ShapeBounds.Bottom + 10
End With
End Sub
Could you tell us if my suggestion code help you to solve your problem?
I hope will helps.
Thanks,
Related
I have a data chart DataChart would like to shift data of xAxis along with data lines to right by certain value.
DataChart Screen Shot
Please help me out which property to use from the library that would be able to solve this purpose.
I am using Daniel Gindi line charts for this purpose.
I use this to create an offset to the left of my chart
myChart.xAxis.spaceMin = 10
maybe it'll do for you
And to align the yAxis lines in front of the labels, i think you could remove the background grid and create your own limit lines if you don't find any other way around
is it viable to subtract the distance d from the x values? that would shift it rightward.
d = 7.0
rightShifted = newGraphData.values.map{ChartDataEntry(x:$0.x-d, y:$0.y)}
So I want to add space between the legend of a multiple line chart. There is only the option to adjust center | left | right
What it looks like now - The labels are aligned according to the "label size":
What I want to look like - It should be 3 colums of 2 labels each Or maybe, add some space or set a minimum size for each legend:
This is the part of the code that enables the legend.
lineChartView.legend.enabled = true
lineChartView.legend.horizontalAlignment = .center
I've tried chartView.legend.stackSpace | chartView.legend.xEntrySpace | chartView.legend.yEntrySpace but nothing seems to change.
Anyone can help ?
There is a property of Chart "extraBottomOffset" and its datatype is CGFloat, try to give some value and see the change
PLease use legend.yEntrySpace = "value" for legend.orientation = .vertical.
I would like to position spokes in pie to be put "outside" of the pie.
My problem is that on top and bottom, spokes need to go out of the "box" of the chart view.
This lead to spokes be inverted and placed in wrong direction.
I placed
self.clipsToBounds = false
self.canvas.clipsToBounds = false
My question is how to persuade chart to dray outside the bounds, or how to put padding around the chart.
Marko
Pasting my answer from https://forum.shinobicontrols.com/t/position-of-the-spokes-in-pie/1693 in case it helps anyone here:
You can adjust the radius of the donut chart by setting donutSeries.outerRadius, and the length of the spokes by setting donutSeries.style().spokeStyle.length. Decreasing the outer radius and possibly also increasing the spoke length should give you the effect you're looking for.
Probably a very basic question.
I am using iOS-charts and am working with a radar chart.
I am struggling to figure out how to remove the labels from the graph and I am really struggling to FILL the web. I can change the outer lines but I want to fill the web/data in a specific colour.
any help would be much appreciated.
Kind regards
Wayne
So, there are two types of labels on a radar chart, the axis label that shows you the list of possible values on the chart from min to max and the labels that correspond to each point on your graph.
REMOVING AXIS LABELS
Grab either the x or y axis on your radar chart view and set drawLabelsEnabled to false depending on the axis of the labels that you wish to hide
let yAxis = radarChartView.yAxis
let xAxis = radarChartView.xAxis
yAxis.drawLabelsEnabled = false
xAxis.drawLabelsEnabled = false
REMOVING LABELS FOR VALUE OF EACH POINT
Go to the location that you create your RadarChartDataSet
Before using it to create your RadarChartData, set the drawValuesEnabled property to false
let radarChartDataSet = RadarChartDataSet(yVals: dataEntries, label: "label")
radarChartDataSet.drawValuesEnabled = false
Also, here's a link to the Charts documentation page which can also be helpful (although it is not fully filled-in): http://cocoadocs.org/docsets/Charts/2.0.9/index.html
I need to plot around 80 Box Plot in Single chart, I have created 80Series with 7 Point eachs, The Issue is the Box plot are plotted properly since I am using Position but the problem is on X axis I am getting only 7 points labels I want that for all the 80 Box Plot.
I have made a simple code that I think you can use to achieve as you want:
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.Legend.Visible = False
Dim i As Integer
For i = 0 To 80
TChart1.AddSeries scBox
TChart1.Series(i).FillSampleValues 7
TChart1.Series(i).asBoxPlot.Position = i + 10
Next
TChart1.Axis.Bottom.Labels.Style = talValue
TChart1.Axis.Bottom.Labels.Angle = 90
End Sub
Could you tell us if previous code help you? If it doesn't help please, tell us exactly what you want, so, we will try to give you, a good solution.
Thanks,