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
Related
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.
I have a question about iOS Charts by Daniel Cohen Gindi here. The figure below shows my full dataset drawn out as a scatter chart. With the x-axis labels going from January to December (let's say 2018), and then again January to December (2019).
The problem is that I don't want to show all data in range, but just in the past six-month range, July-December, as I want the scatter chart view to look like depicted below. (Note: assume the right-most data point is today.)
I want the user to be able to scroll right to see more data points in the past. I've tried this Swift code below but it would "lock" the x-axis to show July-December, and the user can't scroll right to see past data:
#IBOutlet weak var scatterChartView: ScatterChartView!
scatterChartView.xAxis.axisMinimum = 17.5 // + or - 0.5 for padding
scatterChartView.xAxis.axisMaximum = Double(months.count) - 0.5
And then I would try this code below but it would initially show data from the first 6 months, January-June of 2018. However, the user could scroll left to see the later months.
scatterChartView.setVisibleXRangeMaximum(6)
Close but not quite. Is there any way I could show data from the last 6 months upon loading the scatter chart, and have the user scroll right to see past data?
I found the answer!
scatterChartView.moveViewToX(17.5)
Per documentation, moveViewToX(float xValue) – Moves the left side (edge) of the current viewport to the specified x-value. The view port refers to "what is visible on the chart, aim of the view).
Upon chart loading, the viewport is initialized showing the most recent 6 months, and I can scroll right to see past data.
I am planning to do a linechart, which should represent price changes based on a week, a month and so on. Therefore, I use the cocoapod "Charts" (github.com/danielgindi/Charts).
I always have the price changes for a certain point in time. I am wondering now how I could create the chart, that the x-line is showing the values according to the accurate time - and not the same distance for each value, even when two values are on the same day, and the next one 3 days after.
At the moment, it looks like this:
This should then help to insert a marker, where the user can move through the days/months, and see what the price was for each point in time.
Does anybody of you has an idea? I thought about adding values for each half hour to the dataset, with dummy values, to receive the same result, but this doesn't seem like a perfect solution..
Thanks a lot,
Alex
Suppose that I have a list of 40 planets (OK some are from another solar system). Astronomers have counted the number of meteors hitting the planets from January to December. So I have 40 rows of 12 columns of data.
When I plot a 3D chart the planets are displayed on the depth axis, the months January to December are on the Category axis, and the number of meteors on the value axis.
But some of the planets are missing. It seems SpreadsheetGear or Excel is treating the planets like numbers.
How do make SpreadsheetGear display all planets on the depth axis?
PS. I reviewed all related Spreadsheetgear docs but I couldn't find how to do this and checked StackOverflow for related questions but didn't find any.
Thanks, CoolBreeze
I think I solved my own problem:
1) I increased the width of the chart when I called AddChart:
ChartObj = m_WorksheetObj.Shapes.AddChart(Left, Top, Width, Height).Chart
2) I set TackLabelSpacing = 1
Dim DepthAxis As IAxis = ChartObj.Axes(AxisType.Series)
DepthAxis.TickLabelSpacing = 1
I'm not sure if that is the best solution but it appears to work for me at the moment.
If I add more planets the labels will be closer together and it'll be harder to read the labels. I'll have to widen the chart some more to spread out the labels to make them easier to read.
I added numbers in front of the planet names so when I looked at the list of planets on the chart I could see 1-40 and I knew all planets were listed.
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.