| | |
| | | prefix + "全省跨区域人员流动量情况", |
| | | chartService.lineChart("万人次", |
| | | series(years, yearData, item -> item.totalDaily), false, 1100, 715), |
| | | new HolidayTrendWordService.ImageSize(5268595L, 3424555L))); |
| | | lineImageSize(5268595L, 3424555L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期累计跨区域人员流动量走势", |
| | | chartService.lineChart("万人次", |
| | | series(years, yearData, item -> item.totalCumulative), false, 1100, 590), |
| | | new HolidayTrendWordService.ImageSize(5268595L, 2821305L))); |
| | | lineImageSize(5268595L, 2821305L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期各交通运输方式客运量占比情况", |
| | | chartService.pieChart("人次", selected.modalShare(), 1000, 607), true, |
| | |
| | | "“" + holidayLabel + "”假期自驾出行量情况", |
| | | chartService.lineChart("万人次", |
| | | series(years, yearData, item -> item.selfDrivingPersonFlow), false, 1100, 522), |
| | | new HolidayTrendWordService.ImageSize(5232400L, 2484120L))); |
| | | lineImageSize(5232400L, 2484120L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期铁路客运量情况", |
| | | chartService.lineChart("万人次", |
| | | series(years, yearData, item -> item.rail), false, 1100, 445), |
| | | new HolidayTrendWordService.ImageSize(5264785L, 2129155L))); |
| | | lineImageSize(5264785L, 2129155L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期水路客运量情况", |
| | | chartService.lineChart("万人次", |
| | | series(years, yearData, item -> item.water), false, 1100, 433), |
| | | new HolidayTrendWordService.ImageSize(5274310L, 2075815L))); |
| | | lineImageSize(5274310L, 2075815L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期民航客运量情况", |
| | | chartService.lineChart("万人次", |
| | | series(years, yearData, item -> item.civilAviation), false, 1100, 521), |
| | | new HolidayTrendWordService.ImageSize(5271135L, 2496185L))); |
| | | lineImageSize(5271135L, 2496185L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期道路客运量情况", |
| | | chartService.lineChart("万人次", |
| | | series(years, yearData, item -> item.road), false, 1100, 590), |
| | | new HolidayTrendWordService.ImageSize(5268595L, 2821305L))); |
| | | lineImageSize(5268595L, 2821305L))); |
| | | |
| | | blocks.add(new HolidayTrendWordService.SectionBlock("三、车流量走势")); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期高速公路车流量情况", |
| | | chartService.lineChart("万辆次", |
| | | series(years, yearData, item -> item.expressway), false, 1100, 590), |
| | | new HolidayTrendWordService.ImageSize(5268595L, 2821305L))); |
| | | lineImageSize(5268595L, 2821305L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期普通国省道车流量情况", |
| | | chartService.lineChart("万辆次", |
| | | series(years, yearData, item -> item.nationalProvincial), false, 1100, 590), |
| | | new HolidayTrendWordService.ImageSize(5268595L, 2821305L))); |
| | | lineImageSize(5268595L, 2821305L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期全省车流总量情况", |
| | | chartService.lineChart("万辆次", |
| | | series(years, yearData, item -> item.totalVehicleFlow), false, 1100, 590), |
| | | new HolidayTrendWordService.ImageSize(5268595L, 2821305L))); |
| | | lineImageSize(5268595L, 2821305L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | "“" + holidayLabel + "”假期公路出行结构", |
| | | chartService.stackedBarChart("万人次", |
| | |
| | | prefix + "普通国省道观测站平均机动车速度", |
| | | chartService.lineChart("公里/小时", |
| | | Collections.singletonList(series("平均速度", observation.speed)), false, 1100, 590), |
| | | new HolidayTrendWordService.ImageSize(5268595L, 2821305L))); |
| | | lineImageSize(5268595L, 2821305L))); |
| | | blocks.add(new HolidayTrendWordService.ChartBlock( |
| | | prefix + "普通国省道观测站平均拥挤度", |
| | | chartService.lineChart("拥挤度", |
| | | Collections.singletonList(series("平均拥挤度", observation.congestion)), false, 1100, 590), |
| | | new HolidayTrendWordService.ImageSize(5268595L, 2821305L))); |
| | | lineImageSize(5268595L, 2821305L))); |
| | | |
| | | File template = resolveTemplateFile(); |
| | | if (!template.exists() || !template.isFile()) { |
| | |
| | | return result; |
| | | } |
| | | |
| | | private HolidayTrendWordService.ImageSize lineImageSize(long width, long height) { |
| | | return new HolidayTrendWordService.ImageSize( |
| | | width, HolidayTrendChartService.scaleLineChartHeight(height)); |
| | | } |
| | | |
| | | private File resolveTemplateFile() { |
| | | List<File> candidates = new ArrayList<>(); |
| | | File configured = new File(trendTemplatePath); |