pie chart but in another shape - charts

I just wanna ask if it is possible to make a pie chart but in another shape.
An example would be say there were two candidates who ran for governor in a state. I would want to show the results in a chart. I want the shape of the chart to resemble the shape of the geographical location of the state.
I did some digging and this is the only one that showed up which may help me(but not really) https://forums.adobe.com/thread/988130

As your adobe thread implies there are (at least) three issues to consider:
1) you want to show the votes each candidate received as a portion of the area of the state. If your state is nearly square, you could overlay a grid and assign each candidate a number of grid cells according to the votes they received. If the grid cells are county or precinct outlines that works even better, but this isn't a pie chart because a pie chart uses a polar coordinate system.
2) if you really must have a pie chart which is polar, consider that the average viewer may not be able to visually integrate the areas to get meaningful results. Further you will have to integrate the area swept out by the sectors of the pie like a radar screen, and this contour integration is made more difficult by the fact that you must do it numerically. This means you must sample the boundary distance as a function of angular displacement from some center of gravity you have chosen, like the state capitol. But depending on the location of the state capitol, your visual could become even more distorted. Idaho comes to mind.
3) a good compromise might be just to overlay a pie chart on top of a silhouette or map outline of the state with appropriate drop shadows and emphasis to make the pie chart pop as well as the state outline. it would certainly be much quicker as well as much more readable.

Related

Why does AWS CloudWatch dashboard widget does not respect scales when drawing two lines?

I'm new to AWS and CloudWatch.
Here is a screenshot of a CloudWatch dashboard showing two parameters related to a Dynamo table.
As you can see in the pop-up the value of the sample for the orange timeseries is 2,252 while the value of the sample for the red timeseries is 7,000, yet the red chart is drawn under the orange chart. If you check the scale on the left, it seems the red series is the one that get drawn correctly, while the line of the orange one is somehow "inflated".
Can you please help me understand what is the reason behind this?
It looks like your mouse hover point data and the popup data are out of sync. Just a UI glitch.
The popup is showing 09:57 and probably on the chart at 09:57 those are the correct values.
The hover point you chose is a particular peak and is at what time? The last digit is cut off from the display but it's definitely not a 7! Looks like "09:50" maybe?
Minor UI glitch is my diagnosis.
Eventually I come up with this different set up, where one of the series has values mapped on the left Y-axis, while the other series has values mapped on the right Y-axis.
The main drawback is that the two series are not directly comparable, but at least the difference in value is more evident.

How to implement this stacked line chart in MPAndroidCharts or iOS-Charts

I have a number of charts/graphs created with the ported MPAndroidCharts project iOS-Charts by DanielGindi but I'm getting a request and I'm just not sure it's technically possible with things as they exist today.
I have used gradients but not sure if there's a way to kind of have it just be a 2 sided/colored gradient instead of a gradual fade. I have not created or seen an example of a dotted line coming through the existing chart but assuming zoom isn't a possibility I could hypothetically float a view over the top of it but I'd definitely prefer to have it in the native charts code/implementation.
The first graph is showing how much a user plans to have at retirement, the two shades of green represent different sources of money, the dotted line represents their spending from retirement to their estimated time of death.
The second graph is showing the gap between how much a user plans to have at retirement and how much we project they're missing compared to what they have and how that will look across the time from retirement to estimated death.
Thoughts?
It looks like a line chart with three lines and each with a solid fill.
In the top one, the dashed line graph has a white stroke and no fill, but in the bottom one, it has a black stroke and gray fill.
In the top one, the dashed line should be z-ordered to be on top, but in the bottom one, it should be z-ordered to be on the bottom.

Personalized "includeArea" on Google Charts

I am trying to visualize real-time data on a chart. My goal is to set a value that is considered normal (37°C for body temperature, for example) and personalize the real-time data curve according to this value. As the real-time value gets higher than the normal value, I want it to adapt its includeArea color. Here is what I want:
And here is what I could obtain so far:
I am using the Charts Flutter. includeArea is drawing the area skirt representing the data, down to the domain axis. That is why, the coloring which was supposed to be until the 37°C is going further until the domain axis (x-axis).
Any thoughts about how I can obtain what I want, please?
Thank you very much.

multiple stacked area charts nvd3 - errors

I am trying to create a dashboard with multiple area charts on the same page. I have two issues.
I want to get rid of the small circle on the chart that indicates value point and moves along with the cursor and the interactiveguideline. What is the name of that circle and how do I remove it?
After some research, I figured out how to change the Y-axis values to percentages. But I would like some graphs to show percentages and others to show regular numbers. Is there an easy way to do this?

How to apply horizontal break to a d3.js bar chart

I am using Rickshaw (based on d3.js) to plot stacked bar charts. The problem is that the first bar is usually way more higher than the others, ruining the visual feedback.
Using logarithmic scale is (I guess) not an option here, because then the proportions between stacks in a bar will get broken. I wanted to introduce a horizontal break like in following image:
However, I cannot find any out-of-the box feature of Rickshaw or d3.js to do something like this. Any suggestions on how to make one?
This would require quite a bit of additional work. Here's an outline of what you would have to do.
Create two scales, one for the lower part and one for the upper. Set domains and ranges accordingly.
Pass values to the lower scale, capping them at the maximum domain value such that bars that are longer will reach the maximum.
Pass values to the upper scale, filtering those that are lower than the minimum.
You basically need to create two graphs that are aligned with each other to give the impression that there's just one. If you keep that in mind, doing it shouldn't be too difficult.
Here's a quick and dirty proof of concept that uses the linear scale's .clamp(true) to prevent the bars from becoming too long for values outside the domain.
The d3fc-discontinuous-scale component adapts any other scale (for example a d3 linear scale) and adding the concept of discontinuities. These discontinuities are determined via a 'discontinuity provider', which can be used to create one or more 'gaps' in a scale.
For example, to remove a range, you can construct a scale as follows:
var scale = scaleDiscontinuous(scaleLinear())
.discontinuityProvider(discontinuityRange([50, 75]))
Here is a complete example that shows how to use this to create a 'break' in a scale in order to render values that have large gaps in their overall range.
https://bl.ocks.org/ColinEberhardt/b60919a17c0b14d745c881f48effe681