ExtJs 4 Pie Chart - Re size pie slice - extjs4

I am using the extjs 4.0.7 pie chart. I want to set the size of a pie slice.
I want this thing because in my charts suppose there are only two slices
For January (value = 1000)
For February (value = 0.1)
When the chart is rendered for the above data the slice of the February is very small and almost not visible.
I want to increase the size of it and could not figure the way to achieve this.
Can some one help me out to achieve this thing.
Thanks!

xtype: pie have property lengthField : String where you can set which field name will be used for slice lengths. And value of this field will handle length of each slice. So small values could have big length to see them. Will look like something in Custom pie demo

Related

Altair sorting Chart

I'm trying to plot the data of my DataFarme in a groupedChart and I want the columns to preserve the order I gave them before. The data looks as follows (its not all there but its in the same way organized)
dataframe
When I plot it I get the following Graph:
graph
So the months were sorted even though I specified not to sort in the chart. I used the following code:
chart2 = alt.Chart(melted).mark_bar().encode(
column=alt.Column('variable',sort=None),
x=alt.X('room',sort=None),
y=alt.Y('value'),
color='room',
tooltip= ['room', 'value']
)
Does anyone know how I could fix that?
You've already used sort=None, which is the correct way to make scales in a non-faceted chart reflect the input order.
The missing piece is that faceted charts share scales by default (See Scale and Guide Resolution), so each facet is being forced to share an order.
If you make the x scale resolution independent, then each facet should retain the input order:
chart2 = alt.Chart(melted).mark_bar().encode(
column=alt.Column('variable',sort=None),
x=alt.X('room',sort=None),
y=alt.Y('value'),
color='room',
tooltip= ['room', 'value']
).resolve_scale(x='independent')

Stop .Net Chart (DataVisualization) From ReSizing To Tiny Chart?

I have a chart that has strings for its x axis (a list of names). It's linked to a dynamic array, I have a problem where the graph resizes itself and squeezes 14-15 strings from the array and makes the bar chart small and tiny.
How can I achieve chunky bars and a scroll bar to scroll down to see the rest of the data even when new values are being added to the x-axis at runtime.
Have spent an hour searching with no help! =[
Edit:
Setting the PixelPointWidth Property to 300 gave me the width of the bar the way I want to be, but it has bunched the bars so that all the bars of the 4 series are overlapping instead of being side by side. WHere to go from here?
Edit2:
Manipulating the charts height is definitely getting the desired results, the only thing is the bigger the height, the more white space at the top of the chart, whats the fix for that,. and a fix for the Series representations to be "frozen" on scroll.
You can set the width of the chart every time you add new data to it:
Dim barWidth = Double.Parse(Chart1.Series(0)("PixelPointWidth"))
Chart1.Width = CInt(nData * barWidth) + 100
where nData is how many points there are and the 100 is some amount to take into account the space needed for the Y-axis labels and the legend.
Place the chart control in a Panel as suggested by jmcilhinney with AutoScroll set to true, and you will get a scrollbar when the width of the chart exceeds the width of the panel.
If you want the chart to show the latest added data, you can set the horizontal scroll position after setting the width of the chart:
Panel1.HorizontalScroll.Value = Panel1.HorizontalScroll.Maximum

Optimal display for overlapping series in a line chart

In a context of a line chart displaying time data in regular intervals where multiple series might overlap what would be the optimal way to:
A) hint the user that the chart has overlapping series?
B) give the user the capability to visualize all those series? Like spanning the series somehow?
For overlapping series in a line chart, I would keep the traditional line chart but put a label at the end of the graph with a color legend. The legend and label will help the user get information quickly.
Another version of a line chart for overlapping series can be a line area chat.
If you are not stuck on only line charts, I would suggest a bar chart. Below are some examples that you can use.
Example 1:
Example 2:
Example 3:
There are couple ways to indicate that there are overlapping series on a chart. You can increase the marker radius of one of them. The number of legend elements tells you how many series there is, too. Finally, you can distribute series on a different yAxis, with different top and height properties. Also, in styled mode, when you hover on legend item, other series opacity changes.
API Reference:
http://api.highcharts.com/highcharts/plotOptions.line.marker.radius
Examples:
http://jsfiddle.net/whsgpdyw/ - changing marker radius
http://jsfiddle.net/fuq6j4sg/ - each series on a different yAxis

Is there a way to convert bubble chart size?

I have created a bubble chart using the fusion charts api in asp.net. The question/issue I have is leaning more on scaling the chart itself, rather than the particular library I used to generate it.
The chart I have is designed like this:
X = roi
y = lift
circle size = revenue
The code below sets the max/min values of the x axis:
roiMax += 30 'pad the max and min roi values so the bubble wont cut off
roiMin -= 30
I used the new roi min/max values and set them as the minimum/maximum x axis values. It seems to work in most cases. However, if the points displayed are all near each other, then the bubbles become squished together.
If I comment out the portion where I set the x/y max min value of the chart, it looks to scale more properly. However, there are bubbles that cut off if it reaches the edge of the chart. So I want to try to set min/max values for x and y so I can show the full bubble. However, to do that I need to use the circle size to grab the length so I can determine the proper chart limits. Is there a way to convert the size into units of x or the units of y for me to find the proper limit?

How to zoom only a particular slice in pie chart (CorePlot ios) and not the entire piechart

How to zoom only a particular slice in pe chart (CorePlot iOS) and not the entire piechart on user interaction.
I know the following method gives the slice touched:
-(void)pieChart:(CPTPieChart *)plot sliceWasSelectedAtRecordIndex:(NSUInteger)index
but i want to zoom only that slice ?
You can "explode" the selected slice. Implement the -radialOffsetForPieChart:recordIndex: method in your datasource and return a positive offset for the selected slice to make it pop out from the rest of the pie.
You can use the -sliceFillForPieChart:recordIndex: datasource method to control the fill for each slice. This would allow you to adjust the color and/or transparency to highlight the selected slice.
If you want to make the selected slice larger than the others, use a second pie chart to display the selected slice. Use the same plot data for both plots. On the first one, use the normal slice fill for all but the selected slice, which could be transparent. Reverse that pattern for the second plot, i.e., all slices transparent except the selected one.
You said like below...
If you want to make the selected slice larger than the others, use a second pie chart to display the selected slice. Use the same plot data for both plots.
I need like this concept.I am selecting one slice from outer pie chart and need to load that selected slice value in second pie chart, and make some effects. How to load that value in second chart.Sample code is very handful.