Google Chart my Y axis dont show right numbers? - charts

chs=800x300
&chxl=1:|10:00|11:00|19:30|2:|Tidspunkt|3:|Kcal|
&chxt=y,x,x,y
&cht=lc
&chco=3072F3
&chds=3735.6
&chd=t:1198,2663,3396
&chxr=0,599,3429.96
&chdl=Energi
&chdlp=b
&chls=1|1|1
&chma=5,5,5,25
&chm=o,000000,0,-1,5|o,000000,1,-1,5|o,000000,2,-1,5
Is what i have.. test it here:
http://code.google.com/intl/sv-SE/apis/chart/image/docs/chart_playground.html
10:00 should be 1198
11:00 should be 2663
19::30 should be 3396
Which it is, but in the chart it is not displaying right. Look at the 10:00 dot its above 2500, but the value is only 1198?
What should be fixed here?
This has a bounty of 250 and is relatively easy for those who know about Google charts

I changed the following values to this and it seems to work:
&chds=599,3429.96
You had a problem where the axis was scaled differently than your data. The chxr should have the same range as chds.

Related

Flot chart x axis time is displaying wrong details in the starting of xaxis

I am facing an issue with flotchart x-axis time issue. XAxis data is displaying the wrong details.
Here in the Datagrid time is started from 13:00:04, but in the chart, time is starting from 8:00`.9:00,10:00:11:00:12:00 as you can see in the above screenshot. Actually, it should start from 13:00, I am not sure why 8:00, 9:00 ...12:00 are coming in the chart x-axis. Can anyone please help me? Thanks
Below is the code snippet.

Tableau add trend line to discrete data?

I have run into this more times then I like, and I think it will continuously haunt me. I am creating reports/dashboards that report monthly or yearly or weekly data. The dates come in with just the last day of the period. For example, now I am working 2019 monthly report that is a bar chart with a trend line. Took me about 15 minutes to make in excel. However, we are trying to move everything into Tableau for dashboards. Trend line is always grayed out when using discrete dates and sometimes when using continuous dates. The dates are in the format DD/MM/YYYY so I can convert them as continuous but that skews the spacing on the X-Axis. I have messed around to get it to work but it takes time. I am shocked that this very basic thing does not work when Excel has been able to do it for a very long time. Does anyone know of a good work around? I have tried calculated the trend line myself, but do not see how I can add in the y=mx+B line that is generated. I am debating creating a data set just for this, but that seems long and hard way for something that I would have expected out of the box. Below is some basic data, in Excel it takes about 1 minutes to create a line chart, click (+) add trend line and your done.
I was not able to deal with the skew of the X-Axis very well but playing with the date it started and setting the major tick marks to monthly got me close. Looking at the picture below you will see the tick marks are not in the center of the bars but close. As for the trend line, I added a Dual axis on the same data that was the sum of all shown fields with no division by the parts (this is a stack mark bar chart). Since this is a basic line chart with continuous dates, a trend line is a simple click. I then removed the Tick Markets and set the opacity to 0% making the line invisible. I did not change the trend line so now that is all you can see. Seems like a long and hard way to do it, but it works. (UPDATE) Better fix, NEVER USE EOM always use First of Month.

Tableau constant reference line issue when changing date range

I have a few reference lines showing the previous year's averages. The problem I'm running into is when I select a smaller date range (like 10 days vs 90 days) the chart just cuts to that date range instead of resizing the entire chart so that you can look closer at the selected days. Is there a way around this?
This is not how I'd like it to look when I isolate down to a smaller timeframe:
Resolved...changed the date to discrete that fixed the issue.

How to Create Hours xAxis

I read all the relevant issues, and also the wiki.
I'm trying to put Hours on the X - Axis, and want to show minutes when dragging the tracer.
For Example - making points of 10:00, 09:00, 08:00.... and when dragging the tracer between them show the exact value for example 10:22 on the tracer label.
How can I do it?
Thanks

duration on horizontalbar with chartjs

For a couple of days I have been trying to get my chart working like I want it to work.
What I want is:
I want to create a horizontalbar chart with on x-axis duration (not time) in hh:mm format. On the y-axis I want the activity of the bars.
Two days ago I asked this question hh:mm in chart.js on X-axis and text labels on the Y-axis with the use of moment.js because I hoped that would do the trick, but it didn't...
Does anybody know if its possible and how I can achieve this?
Thanks in advance