Is there a way to handle the distance tag adding distance="1%" like Ionic 1, but I want it in Ionic 2.
If you have look at the docs you will see that there is a threshold property listed under Input properties. Right next to it there is an explanation which says the distance can be specified either in % or in px:
<ion-infinite-scroll threshold="30%" (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
Related
I use Oracle APEX (v22.1) and on a page I created a (line) chart, but I have the following problem for the visualization of the graphic:
On the y-axis it is not possible to show the values in the format 'hh:mi' and I need a help for this.
Details for the axis:
x-axis: A date column represented as a string: to_char(time2, 'YYYY-MM')
y-axis: Two date columns and the average of the difference will be calculated: AVG(time2 - time1); the date time2 is the same as the date in the x-axis.
So I have the following SQL query for the visualization of the series:
SELECT DISTINCT to_char(time2, 'YYYY-MM') AS YEAR_MONTH --x-axis,
AVG(time2 - time1) AS AVERAGE_VALUE --y-axis
FROM users
GROUP BY to_char(time2, 'YYYY-MM')
ORDER BY to_char(time2, 'YYYY-MM')
I have another problem to solve it in another way: I am not familiar with JavaScript, if the solution is only possible in this way. Because I started new with APEX, but I have seen in different tutorials that you can use JS. So, when JS is the only solution, I would be happy to get a short description what I must do on the page.
(I don't know if this point is important for this case: The values time1 and time2 are updated daily.)
On the attributes of the chart I enabled the 'Time Axis Type' under Settings
On the y-axis I change the format to "Time - Short" and I tried with different pattern like ##:## but in this case you see for every value and also on the y-axis the value '01:00' although the line chart was represented in the right way. But when I change the format to Decimal the values are shown correct as the line chart.
I also tried it with the EXTRACT function for the value like 'EXTRACT(HOUR FROM AVG(time2 - time1))|| ':' || EXTRACT(MINUTE FROM AVG(time2 - time1))' but in this case I get an error message
So where is my mistake or is it more difficult to solve this?
ROUND(TRUNC(avg(time2 - time1)/60) + mod(avg(time2 - time1),60)/100, 2) AS Y
will get close to what you want, you can set Y Axis minimum 0 maximum 24
then 12.23 means 12 hour and 23 minutes.
Background
I am coding an frontend page in typescript with react-google-charts to scatter plots and draw a 3-dimensional polynomial trendline based on the plots.
I am required to draw the trendline whose formula should not be like "ax^3 + bx^2 + cx + d" but just "ax^3".
Looking over the official documents, I found I can define the number of dimension by "degree" key in option parameter:
options = {
....
trendlines: {
0: {
type: "polynomial",
degree: 3,
visibleInLegend: false,
pointSize: 20, // Set the size of the trendline dots.
opacity: 1,
},
....
}
However, I cannot find the way to customize the terms of the polynomial.
Questions
How to customize the terms of the polynomial trendline?
If it is impossible, what could be the alternatives? (I guess I would have to manually implement a least squares method for calculate the coefficients from the scatter plots.
I looked over the following websites, but could not find the parameters customizing the terms of polynomial trendline formulas.
https://developers.google.com/chart/interactive/docs/gallery/trendlines#polynomial-trendlines
https://www.react-google-charts.com/components/chart
I'm trying to create something close to this using Google Chart API:
So far, I've got this:
<img src="//chart.googleapis.com/chart?
chbh=a
&chs=461x337
&cht=bvg
&chco=323232,7bc247&c
&chd=e:zM,Mz" width="461" height="337" alt="" />
Which generates this
http://jsfiddle.net/alexjamesbrown/c2VAP/
Which is almost there, but I can't figure out how / if I can add a label underneath the bars?
If you want to get labels like that, you have to make a few changes. Set the following chart parameters:
cht=bvs // create a stacked chart
chd=zM__,__Mz // insert null values for the opposite data points
chxt=x // create an x-axis
hxl=0:|Label+1|Label+2 // set the labels on the x-axis ("+" translates to a space)
see example: http://jsfiddle.net/asgallant/c2VAP/2/
I am working with Google Charts. I need to add a '$' before the values on the y-axis as well as the value in the bubbles.
Is there a setting for this?
take care,
lee
UPdate,
Here is the data being used by the charts:
'Month','Semi-Detached in Toronto E04','Semi-Detached in Toronto E08','Condominium Townhouse in Toronto E04','Condominium Townhouse in Toronto E08', ],
['7/2011', 4354000,15305800,6776500,495000],['8/2011', 700000,10514418,7060786,0],['9/2011', 6854800,17805400,12087300,0],['10/2011', 7287400,14248900,16206500,0],['11/2011', 2696245,9733270,12698090,0],['12/2011', 1965800,6054500,8854390,0],['1/2012', 2450968,9012200,5500100,0] ]);
I've tried adding '$' before the values as well as '%24' as suggested before, but both throw syntax errors. And the values cannot be quoted without throwing a Google Charts error '
Data column(s) for axis #0 cannot be of type stringĂ—'.
Thanks everyone for your input. I found a question that was 99.9% the same:
How to set tooltips to display percentages to match axis in Google Visualization Line Chart?
Try using %24 which is the urlencoded form for $.
Use:
var formatter = new google.visualization.NumberFormat({prefix: '$'});
Check the example here:
https://developers.google.com/chart/interactive/docs/examples#interaction_example
More details here:
https://developers.google.com/chart/interactive/docs/reference#numberformatter
I'm trying to display some very simple data using Google Charts API.
My data are a serie of X,Y points:
(1,44) (2,46) (3,46) (4,43) (5,46) and (6,44).
X-axis : from 0 to 300, step 50
Y-axis : from 1 to 50, step 5
I should end up with a line almost in the top, to the left, of the chart (43-46 are near 50).
But here is what I get:
URL = http://chart.apis.google.com/chart?cht=lxy&chs=500x300&chd=t:1,2,3,4,5,6|44,46,46,43,46,44&chxt=x,y&chxr=0,0,300,50|1,0,50,5
If I change Y-axis, 1 to 100 (instead of 50), it's ok...
URL = http://chart.apis.google.com/chart?cht=lxy&chs=500x300&chd=t:1,2,3,4,5,6|44,46,46,43,46,44&chxt=x,y&chxr=0,0,300,50|1,0,100,5
I'm probably mistaking, but I can't find what is wrong.
If you add data scale the chart does show correctly.
http://chart.apis.google.com/chart?cht=lxy&chs=500x300&chd=t:1,2,3,4,5,6|44,46,46,43,46,44&chxt=x,y&chxr=0,0,300,50|1,0,50,5&chds=0,300,0,50