AM/PM timeline in amCharts - amcharts4

I'm having an issue changing the timeline to show 12 hour time with AM/PM instead of 24 hour time.
Adding this line to the timeline chart correctly changes the tooltip to display in AM/PM format:
dateAxis.tooltipDateFormat = "hh:mm a";
According to the documentation adding this line should do the same for the timeline along the X-axis:
dateAxis.dateFormatter.dateFormat = "hh:mm a";
Here's the example I'm using to test.
It isn't working however and there don't seem to be any examples of this working that I can find.
Is this feature not yet working in v4?
Thanks

You have to set the date format directly on the dateAxis' dateFormats object as documented here, e.g.:
dateAxis.dateFormats.setKey('hour', 'hh:mm a');
Codepen

Related

draw.io / diagrams.net - current date in a text field?

Is it possible to enter a variable of some sort in a text field in my diagram that has the current date and will auto-update to the current date whenever I edit the diagram again?
My suggestion would be to try %date% placeholder as described here:
https://www.diagrams.net/doc/faq/predefined-placeholders
Placeholder should be ticked under Edit data: https://www.diagrams.net/blog/placeholders

How to get the reference of a cell based on two filters in Google Sheets?

I am parsing JSON data from a FB Ads Campaign through Graph API in Google Sheets. I have multiple sheets for different ad insights based on a timeframe (today, yesterday, 7 days, 30 days) and a dashboard that shows a snapshot of the most important data like the # of conversions and cost-per-conversion for each campaign.
On the dashboard page, I want to match the Adset ID with the value next to cells that contain 'complete_registration' on an insight page.
This is the current formula I have
=INDIRECT(INDEX("h"&filter(ROW('Todays Insights'!G1:G901),'Todays Insights'!G1:G901="complete_registration")),1)
This works for referencing the first time 'complete registration' is used... but I want the value for each Adset
For example -> IF Column A has Adset_ID and Column B has Complete registration then index value in C
What formula would accomplish this in Google Sheets?
Picture Example
O.K. I think I get it. You want to get 2 coulmns as a result - B and column H when C is registration_complete.
Try:
=filter({'Todays Insights'!a1:a,'Todays Insights'!h1:h},'Todays Insights'!c1:c="complete_registration")
Here is the formula I used that works:
=DGET('Sheet Name'!$A$1:$N$500,"Actions Value",{"Adset ID","Actions Action Type";C24,"lead"})

JavaScript code for adding days to a text field based on other text field in oracle Apex

JavaScript code to add 60 days automatically to release_date field when enter an date to resignation_date field in Oracle Apex .
I think Damir's suggestion to use a Dynamic Action with PL/SQL is a good one. But if you want a true client-side solution, look into https://date-fns.org/. See the addDays function: https://date-fns.org/v2.8.0/docs/addDays

How to add another date to a date selected from popup calendar in Qt C++

I am doing a library management system project in QT C++. in handling burrowing of books i use qdatetimeedit to select the current date. I want to assign the return date by adding 2 weeks to the current date and it should be displayed in a line edit once i select the current date from popup calendar. I don't have an idea to carry this out. Please help. Thank you in advance
After trying a lot I figured It up by myself.
QDate current = ui->dtetimeCurrnt->date();
//adding 14 days to the current date to get the returning date
QDate returnDate = current.addDays(14);
//assigning the returndate to dateedit
ui->dteditRetrn->setDate(returnDate);
Since I couldn't use lineEdit I used a dateEdit.

When using a date column, first and last bars are cut in half

When I use a column type of date, the first and last bars in the ColumnChart are cut in half. It seems to be rendering from mid-bar. It doesn't do this with non-date sets of data.
Is there any way to fix this so that the complete bars are rendered, with some extra padding?
http://jsfiddle.net/7tHVN/
Setting the viewWindowMode does work for dates, apparently. Adding the following to my chart options, where the min and max are dates prior to and beyond the 1st and last date values, worked for me, at least.
'hAxis': {'viewWindowMode': 'explicit', 'viewWindow': {'max':new Date('2012-10-02'), 'min':new Date('2007-07-02')}}
See also: Column Chart crops the end bars in the Google forums.
I had this exact problem (my labels were also weirdly misaligned) and it drove me crazy trying to figure it out. hAxis.viewWindowMode usually fixes issues like this, but it's not possible to use this with date values.
What I ended up doing was just scrapping the date type entirely, specifying the string type for that column instead, and converting each JS date object to a string representation before adding it to the DataTable, thusly:
data.addColumn('string', 'Date');
data.addColumn('number', 'Performance');
var dates = [new Date('2012-4-12'),
new Date('2012-4-13'),
new Date('2012-4-14')];
var performance = [59, 35, 86];
var dateString;
for (var i=0; i<dataForChart.length; i++) {
dateString = (dates[i].getMonth()+1)+'/'+ // JS months are 0-indexed
dates[i].getDate()+'/'+
dates[i].getYear();
data.addRow([dateString,
performance[i]]);
}
This forces the chart to render with a discrete rather than continuous axis, which fixes the cut-off bars problem. As long as your data and dates are spaced along even intervals (once a day, once a week, etc.) and you pass them in in the proper order, this approach should work.
There's more info on discrete vs. continuous axes in the Google Viz docs: https://google-developers.appspot.com/chart/interactive/docs/customizing_axes
Easy Fix here 😎
If you double click on the first column to access the Format Data Point you can widen the individual column width to match the same visibility as the other columns. Same applies to the last column when 'cut off' due to date and axis
This looks like a bug on Excel, easy fix, change the graph type to stacked bar, then switch back to stacked column, and your graph will be fixed.