I'm visualizing a drug database of 200 entries. I've created a piechart using DC.js to show the frequency of each drug. The pie chart is cluttered with drugs that appear once.
I want to adjust this pie chart so that it visualizes the top 5 most used drugs i.e. the top 5 biggest slices of the pie chart.
Is there a way to use the .group() or .reduceSum() methods so only the biggest pie chart slices are shown?
As answered on the user group: Use the functions of the Cap Mixin, which is a base of the pie chart:
var pie = dc.pieChart("#pie-chart");
[...]
pie.cap(5);
Related
I have three graphs:
A line graph time series with only 1 line on it
A line graph time series with n lines on it (n could be 5 could be 50)
A histogram (actually a stacked column chart)
Graph 1 & 2 have the same timeseries axis and therefore they should have a shared zoom (accomplished) and same tooltip.
I have used this demo: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/synchronized-charts/
and this jquery: Highcharts Synchronized charts display tooltip
to get exactly what I wanted for graph 1 & 2.
However when I added graph 3 a few strange things happened:
The tooltip is now shared with the histogram (it shouldn't be -- histograms aren't time-series)
The x-zoom now zooms on the histogram creating a time-series axis?
The shared tooltip doesn't work between graph 1 & 2 now
The perfect solution would be to have a histogram that also filtered as the histogram is measured off graph 1. (NB: lots of data is clipped for the jsfiddle)
pretend this is a code snippet so I can link jsfiddle
Fiddle:
https://jsfiddle.net/cj2tdy7v/1/
I wanted to create a dashboard which fetches data from spreadsheet and generates the pie chart. I found this useful link https://developers.google.com/chart/interactive/docs/gallery/controls#skeleton but it uses two columns for pie chart. I wanted to use 4 columns for my charts and generate pie charts based on each row rather than based on columns.
For example - This selects columns Name and Donuts eaten from the sheet and creates the pie chart.
and creates this
What I want is to use the multiple columns to generate a pie chart. For example pie char for the person named Michael (pie chart with Donuts eaten, Cake eaten, Chocolates eaten)
[Please, follow the image during reading the instructions.]
I have a line chart (1.b) which is used to zoom in a bar chart (1.a) and to select items in a scatter plot (2).
Once I brush the line chart (1.b), the others graphs (1.a and 2) apply the filter perfectly. When I turn off the brush the bar chart zoom out, given me the whole scope of the data back, but the scatter plot (2) does not make the dots appear again.
Please, see last scenario from top to bottom. Scatter plot keeps the previous filter.
what could I do to reset it in case the brush is off in line chart (1.b)?
The goal is to try and show a breakdown of a pie chart by displaying bar graphs off of each slice. This way the user can see the sub-values of each slice in a "different way".
Any idea how to add the bars?
EDIT:
Here is a current iteration. The larger the value, the smaller the "innerSize" value for the outer ring.
Have you considered using a "wind rose" chart? It's similar in style and function to what your higher-ups are suggesting. See http://www.highcharts.com/demo/polar-wind-rose in the Highcharts demo page.
I'm trying to use Highcharts.js to create a chart made up of two types: a box plot and a column inside the same cartesian axis system.
I've got two y axes with different scales (the one for the box plot data on the left and the one for the columns on the right).
The series share the same categories on the x-axes.
Can I combine this two rapresentations in the same chart? The results should be something like this: Boxplot combined with Columns example.
You could use both series types without any problems. To set each point of boxplot series on left side of each column you could use pointPadding and pointGroupping for columns and pointPlacement for boxplot.
Example: http://jsfiddle.net/zyy2g6xs/