I'm trying to get a stepped line chart with Google Chart API. I've searched the docs and haven't found anything.
Here's an example I saw with Flot:
http://www.flotcharts.org/flot/examples/threshold/index.html
More info:
I'm trying to plot account balances over time. So, if there's a balance of $1,000 on Jan 1 and a balance of $2,000 on Feb 1, the google line chart displays a sloped line between Jan and Feb, which does not reflect the actual account balance accurately. I'd rather not plot more values (i.e. by adding the balance of $1,000 on Jan 31) but may have to if that's the only way...
In your example, if you plot the $1,000 on Feb 1 (ie the before and after values on the same date) you get a nice step. It's a work-around and there must be better solutions, but it's easy to implement and does give you what you're after visually.
Look into the following article:
https://developers.google.com/chart/interactive/docs/gallery/steppedareachart?hl=ru
and playground:
https://code.google.com/apis/ajax/playground/?type=visualization#stepped_area_chart
Related
I have a chart in excel I wish to replicate in PBI.
My Excel chart is a bar chart dated axis with 2 series, running up march, but with data only up until now.
Each bar series has a trendline, which forecasts a trend up to the end of the financial year.
In power BI I have tried to replicate, but I cannot seem to add 'forecast' from the analytics tab unless my chart is a line graph.
So I now have 2 line series in a chart like so:
I have added trendline to both but there is no option to add the forecast line unless I only have 1 data series.
As I've removed a series I can now toggle on the forecast line in the analytics tab.
So I now have 1 line series in my line graph like so:
I actually need to have the data and the corresponding forecast for both data series, so I would have series 1 & 2 plotted like above, on the same graph together.
Is there a way to do this on the analytics tab??
If not, how should I go about it? I was thinking I could use DAX to forecast until March 2023 instead and then drag the line into the line graph and format it to dashed?
Thanks
Here is some sample data step by step for what i'm looking for (very simple thing to do in excel!):
This is the same data, pivoted with the 2 series mapped out on a line graph, and trendline added for each:
I just want to be able to show a trendline extending and forecasting forward, past the months I already have like I have done in Excel.
Yeah i think here your best solution would be to use the "what if" parameter in Dax to get the result you need
For a forecasting line to be performed on a line chart, Below requirements should be met. Otherwise You can't see this option on the analytics tab:
You need to change your datasets, and datatypes accordingly.
The last one is especially valid for you, because there is not a one-day period between your data values, in fact monthly organized.
Here is how my data file is structures
Candidate
Month
Decision
candidate-1
Nov
Pass
candidate-2
Nov
Fail
candidate-3
Dec
Pass
I import this file in power BI and I want to make a stacked bar with % of pass and fail for each month.
How can I achieve this?
I can get the count like this
Month
Pass
Fail
Nov
20
4
Dec
12
2
But I need percentage, power BI has no option to display percentage on this data. I tried searching everywhere but no avail. Any help/pointer is highly appreciated.
I found the solution. Actually, it was very simple. Power BI has 2 kinds of stacked bar - 1. Stacked bar based on count (this is what I was using) and 2. Stacked bar based on percent (this is what I needed but did not notice before).
I clicked on the chart and selected "100 stacked column chart" from the list of visuals and it is exactly what I expected it to be.
PS: I am new to power BI and it was nice adventure. Thank you #Ron Rosenfield and #Chris for your comments.
I have built a line chart using two filter conditions and want to include dynamic average line to the visual. Like for example I need to show the average line based on two parameters, first is date i.e. 21st Jan - 25 Jan and the site locations selected, it will only consider average between 21st to 25th Jan and not till 4th of Feb.
The site location will also be selected to count the call volume.
I am struggling to find a way around as I I thought of using SelectedValue or switch method.
Any help will be much appreciated.
I am using elasticsearch version 7.1 in AWS.
I've created a bar chart where x-axis is using date histogram aggregation in 4h interval.
Below is my bar chart, sorry for inputting picture but I've figured it is best way to represent what I have and what I want to do.
Each bar takes 4hour interval worth of data and adds it up from given period Jan-31 to Feb-02. For given interval I would like to show bars for only 13:00:00 ~ 17:00:00 therefore I have one bar for each day.
So from Jan-31 ~ Feb-02 I would have one bar for Jan-31 13:00:00 ~17:00:00, 2nd bar for Feb-01 13:00:00 ~ 17:00:00 and 3rd bar for Feb-02 13:00:00 ~17:00:00.
I found that I could use scripted field and add extra column called hour of day as said here https://discuss.elastic.co/t/kibana-filter-for-a-specific-time-range/105169/2 I have huge data so do not want to use scripted field.
Is there any other way?
Thanks in advance.
Any suggestions on how I can use Google Chart API to display a weekly schedule? For example, a store's hours of operation:
Sunday, 9am-5pm
Monday, 9am-9pm
Tuesday, 9am-9pm
Wednesday, 9am-9pm
Thursday, 9am-9pm
Friday, 9am-12nn, 3pm-9pm
Saturday, 9am-10pm
Looking for examples, code snippet, or general advice.
You could use a stacked bar chart with two plots.
Hours on the Y axis.
Week days on the X axis.
First bar chart has start times.
Second bar chart has end times (minus start times).
The trick: Make the color of the first bar chart the same as the chart background color so you can't see it. Then, you'll just see the second bar chart.
I would start with 24 hour time first. If you get that to work, you can replace the times with text labels (ie 2 PM).
Caveat: I haven't tried this.