Angular 極座標シリーズのサンプル データソース

    このトピックでは、極座標シリーズ のデータソースを実装する方法の例を示します。

    export class SamplePolarData {
    
        public static create(): any[] {
            const data: ISamplePolarItem[] = [
                { Direction: 0,   WindSpeed: 70,  BoatSpeed: 90 },
                { Direction: 45,  WindSpeed: 35,  BoatSpeed: 65 },
                { Direction: 90,  WindSpeed: 25,  BoatSpeed: 45 },
                { Direction: 135, WindSpeed: 15,  BoatSpeed: 25 },
                { Direction: 180, WindSpeed:  0,  BoatSpeed: 0  },
                { Direction: 225, WindSpeed: 15,  BoatSpeed: 25 },
                { Direction: 270, WindSpeed: 25,  BoatSpeed: 45 },
                { Direction: 315, WindSpeed: 35,  BoatSpeed: 65 },
                { Direction: 360, WindSpeed: 70,  BoatSpeed: 90 },
            ];
            return data;
        }
    }
    
    interface ISamplePolarItem {
        Direction?: number;
        WindSpeed?: number;
        BoatSpeed?: number;
    }