전체 글(809)
-
Sencha chart x축 글자 수직으로 표시하기
label의 rotate를 통해서 각도를 원하는 대로 조정할 수 있음 axes: [ { type: 'numeric', position: 'left', title: 'Value', grid: true, }, { type: 'category', position: 'bottom', title: 'Mo..
2024.11.24 -
Javascript 날짜 포멧 설정
const now = new Date();// Create a custom format: YYYY-MM-DD HH:mm:ssconst year = now.getFullYear();const month = (now.getMonth() + 1).toString().padStart(2, '0'); // Month is zero-basedconst day = now.getDate().toString().padStart(2, '0');const hours = now.getHours().toString().padStart(2, '0');const minutes = now.getMinutes().toString().padStart(2, '0');const seconds = now.getSeconds().toStrin..
2024.11.24 -
Javascript List에 컬럼 및 row 추가
데이터let data = [ { name: 'Alice', age: 25 }, { name: 'Bob', age: 30 }, { name: 'Charlie', age: 35 },];컬럼추가for (let i = 0; i 변수값을 컬럼으로 사용for (let i = 0; i row 추가// Define the new row as an arraylet newRow = ['Charlie', 35];// Add the new row to the tabletable.push(newRow);
2024.11.23 -
Javascript ==와 ===의 차이점
==: 데이터만 비교함===: 데이터와 데이터 타입까지 비교함
2024.11.23 -
Sencha chart series 동적 처리
function getSeriesByData2() { let data = [ { DATE: 1732167001000, A: 13, B: 'aks-userpool-260158-vmss000000' }, { DATE: 1732167001000, A: 13, B: 'aks-userpool-260158-vmss000001' }, { DATE: 1732167001000, A: 14, B: 'aks-userpool-260158-vmss000002' }, { DATE: 1732167061000, A: 7, B: 'aks-userpool-260158-vmss000003' }, { DATE: 1732167061000, A: 17, B: 'aks-user..
2024.11.23 -
Javascript 날짜 포멧 설정하기
오라클이나, 자바처럼 formatter같은게 없는 것 같음HH24MIfunction formatDateToHH24MM(date) { // Extract hours and minutes let hours = date.getHours().toString().padStart(2, '0'); // Ensure 2 digits let minutes = date.getMinutes().toString().padStart(2, '0'); // Ensure 2 digits // Return formatted string return hours + minutes;}YYYMMDDfunction getYearMonthDay(date) { let year = date.getFullYear();..
2024.11.23