I have a visualization (below) that is a combination Stack bar and Line graph . I am trying to format the data labels for the line graph totals- so that they all hover above the stacked bar. This works(with default settings) for all of the dates except the first bar (see image below- highlighted in yellow). There appears to be no formatting options available for the data labels of the line graph to control the label position (unlike in the stacked bar).
Any suggestions on how to force the totals to always appear above the bars?
A simple example file is available here https://drive.google.com/file/d/1m4qicc5gv5fCmVPiBe2m6THuHGKjacnx/view?usp=sharing
Any suggestions appreciated.
Go to Format > Y-Axis > Show secondary and set it to the Off position and it should look like this:
What's happening is that your line and bars were on independent axes, which makes them align not how you intend.
PowerBI supports Total labels for stacked visuals:
You can now turn on total labels for your stacked bar/column, stacked area, and line and stacked column charts, allowing you to see the aggregates of your data at a glance
Related
While working on Qliksense, Gauge/Scatter chart is showing horizontal line for large data at one point. Currently, the limitation is if there are more than 1000 data values at any given point in the scatter chart will show as horizontal line at one point. Is there any alternative way to resolve this issue for large data in Qliksense
I'm doing a web analytics data trying to examine the impact of emails on our traffic. The code I have for plotting is simple:
for cid in cids:
vdf = df.query('cid_short == #cid')
plt.plot(vdf['counter'],vdf['visits'], color='red', alpha=0.05)
The goal with the format is the transparency will highlight volume. The darker the region, the greater the volume in that area.
However, when I graph the plots, I see that each line is connected by the previous line, which creates weird shapes as seen in the image below.
How can I distinguish each plot programmatically (I'm dealing with 1000s of campaigns - labelled as cids).
To solve this, I identified that if there are multiple counter instances and are not grouped, then it will show the weird graph. This is important as the line chart is created based on the order of data I feed into it.
To solve this, I did the following:
for cid in cids:
vdf = df.query('cid_short == #cid').groupby(['cid_short','counter'])['visits'].sum().reset_index()
plt.plot(vdf['counter'],vdf['visits'], color='red', alpha=0.05)
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
One question to pretty this graph up:
How to prevent numbers on the x axis from merging together in SSRS stacked bar chart?
Try to play around with the SmartLabels under the properties pane of each series.
I am using core plot to make a line graph for my iPhone app. So far I successfully made the line graph from my xml data.
Furthermore I added a text layer that shows the value (for example 40) once I select the cell
holding the value 40. For this, I use the function:
(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index
So now I want to have a vertical line on the graph to indicate the selected value (the 40). I tried adding CPTBarplot but somehow the bars show only at the beginning of the graph axis.
Is there a function from core plot like the above that will create a line indicator?
I would appreciate if someone can give me some hint how to solve this problem and thank you very much in advance.
You could use a scatter plot for that. There's a point selection demo in the Mac CPTTestApp that draws a crosshair over the selected point. It would be trivial to modify that to only draw the vertical line.
The -numberOfRecordsForPlot: datasource method returns the number of points in the selection indicator (5 for the crosshairs) or zero (0) if there is no current selection. The -numberForPlot:field:recordIndex: method returns the points in the indicator. The points are drawn in this order:
Left
Right
Center (with plot symbol)
Top
Bottom
The -symbolForScatterPlot:recordIndex: method controls the plot symbol in the center. You can eliminate this method if you don't need any symbols on the indicator plot.