I am refering to the official asp.net tutorial http://msdn.microsoft.com/en-us/library/dd456655.aspx . What i did is,,, in an fresh asp.net website, i added a chart control from the toolbox and dragged a table it to from my database. The problem starts now when i added a button and put the forecasting code in the button click event. The code is:
Chart1.DataManipulator.FinancialFormula (FinancialFormula.Forecasting, "2,40,true,true", "Series1:Y", "Series2:Y,Series3:Y,Series3:Y2");
The error message i got is
Forecasting Error – There are too few data points for this regression
type. A minimum of 2 data points are required.
In the chart, i selected "date" as x-axis, and "some number" as Y-axis... And what is this minimum of 2 data points required...
Can anyone help me out with this error.......
This question is a bit old, but I ran across this same situation today and wanted to post my resolution.
This "Too Few Data Points" issue occurs when the the trend line is added before the chart is bound. Simply moving the Financial Formula code below where the data is bound will resolve the issue. (Of course, if you have less than 2 data points in your binding, this won't help you).
Basically, until the chart is bound, the "input series" doesn't actually have the data to be used by the Chart's DataManipulator.
For predicting the future values at least two past values are needed,so if the result contains only one value it will throw error,because it is not possible to compare the values.The series in the chart should have minimum 2 values
Related
I attached a screenshot with captions of what I need. Using tableau here which makes it a little more complicated.
My current Line Graph just stop when activity does. I need it to continue to present day(as 0's).
I went through and used the ZN(Count[XX}) formula - Changed axis to discreet and clicked "Show Missing values" as Zero.
Need all the graphs final week to be April 16 and some to be Zero where there is no activity.
Thank you,
Charles
I have two values I wish to plot against each other in tableau. They are two totals aggregated around the same date. I can get them to the point where they are plotted on a dual access against the date like so:
but any attempt to plot them against each other for correlation has come to nothing. I've tried simple conversion to scatterplot, using calculated fields, using a cross tab with subtitles and attempting to only plot the subtotals against each other all of which have failed. I could do it in Excel but have to do it in tableau.
I have consulted the official Tableau 9.0 guide, google and existing questions on Stack Overflow all to no avail. If I was doing this in BOXI, I could just select the columns and chart them. How do I do the equivalent visualisation in Tableau?
You aren't clear about what type of chart you want to make.
Do you want a scatter plot? If so, put one measure on the row shelf, the other measure on the column shelf, and one or more dimensions (such as your date) on the detail shelf to define how finely to aggregate the data. Check the aggregation functions you use (SUM, AVG) and the aggregation level for your date fields (YEAR, MONTH ...) as desired. You probably want to use the second block of date aggregations on the menu unless you want to group all January data together regardless of year.
If you want a connected scatter plot, set the mark type from automatic to line and move the date field from the detail to the path shelf. You might also then want to put the date on size, color or legend to visually show the direction of time on the line. You might need to change that field to attribute in some cases to avoid creating multiple lines.
Tableau is fantastic once you learn how it works, and get a strong understanding of how choices about treating fields as dimensions or measures, or discrete or continuous impacts the behavior. If you skim over those details, you can still make beautiful charts by following recipes, mimicking examples (and asking StackOverflow), but Tableau's behavior will seem mysterious and arbitrary.
If you take some time to learn the fundamentals about how Tableau works, it will repay your time investment. I recommend Joshua Milligan's book Learning Tableau for a good way to start, along with the training videos on the Tableau website.
This is a follow up to this question which has to that day still 0 answers.
What I really want to do is having in a tableview, a column that has the symbol for the plotted data corresponding to the objects in the table view row. I have managed to generate the colours supposedly followed by the JavaFX chart. The issue I have of course is that my own colour generation works (it goes back to the first colour without fail after 8 elements), when the one from the chart has the issue outlined in my unanswered question.
So.
I would like now to try to pick up the style actually applied to each series of the chart independently from pre-supposed rule about the default order of colours. How do I do that?
This way I could apply those to my table view and even if the colours randomly change upon reloading then at least I will know what I am looking at.
Thanks in advance for your help.
After a bit of research I found that the following code allows me to get what I want, supposing I am interested in the series at index intitem:
plotswingschart.getData().get(intitem).getNode().getStyleClass();
This will produce a ObservableList containing the following string values (here example for the series at index 8 (9th series)):
chart-series-line
series8
default-color2
From this I can then get the information that I need. that is the colour actually applied to that curve. I can then generate a symbol to be used in my tableview.
I would still be interested in an answer to the question linked, which prompted the present question...
I have created a chart using the Silverlight 5 toolkit. It has LinearSeries without the ItemsSource specified (it is assigned later in code). The DateTimeAxis does not have a Maximum nor the Minimum specified as I might be plotting different data at different time. However, no matter what the data to plot is, I would like the points to be spaced out every 30 seconds. When specifying this in XAML the page fails to load (the system runs out of memory). When trying a different (larger) time interval it manages just fine (ex 1 month steps). It seems that if no data is provided to the graph it takes a 1 year interval as default.
Is this a known issue? What is the way to deal with this, other than specifying a Max/Min and then getting rid of it once some data is supplied?
Here is my code:
<toolkit:Chart Title="Live Use">
<toolkit:Chart.Series>
<toolkit:LineSeries
IndependentValueBinding="{Binding Time}"
DependentValueBinding="{Binding Value}"
AnimationSequence="Simultaneous" />
</toolkit:Chart.Series>
<toolkit:Chart.Axes>
<toolkit:DateTimeAxis Orientation="X" Location="Bottom" BorderThickness="2" Title="Time" ShowGridLines="True" IntervalType="Months" Interval="3"/>
</toolkit:Chart.Axes>
</toolkit:Chart>
Apparently this is a bug in the toolkit chart. I found this link which confirms this: http://forums.silverlight.net/t/101287.aspx. The problem is that the chart by default has its range set to 1 year. Now, if you try to set the interval to 30 seconds it will attempt to generate a lot of labels and this will slow it down up to the point where it runs out of memory. Solution is to manually set the range or to specify the itemsSource prior to specifying the interval on the axis.
Hope this helps.
I have 2 Y-axis on the chart and I am trying to use annotationElement's localToData to get the data points associated with a Point on the chart.
The annotation Element is able to return a set of values for the point ( 1 Y - data, 1 -x data), But it is returning the values against one axis and not the other.
Is there a way to associate the annotation element with a specific axis ?
Sorry, this is more of a Flex issue which I did not fully understand at the time of posting.
At that time, My plot series was associated with right axis and hence I felt there was coding error on my end when i called localToData.
Anyway, there is a bug in Flex PlotSeries localToData method that shows up only if you have flex debugger installed.
The bug is a Null Pointer exception on Plot Series code while trying to get filtered data.