Скрипт SQL гистограммы с накоплением
-------------------------------------------------------------------------------------------------------------------------------------------------------------
--
2D Stacked Column Chart
--
-- Notes: The query below will work on the following
database servers:
-- MS SQL
Server, Sybase ASE, Sybase IQ, Sybase Anywhere, MySQL,
PostreSQL
--
-- ORACLE: To make the query below work in Oracle, add
" FROM DUAL" at the end of each
SELECT
-- DB2: To make the query below work in DB2, add "
FROM SYSIBM.SYSDUMMY1" at the end of each SELECT
-------------------------------------------------------------------------------------------------------------------------------------------------------------
select 1
as category,
3000
as s1,
1200
as s2,
1000
as s3,
500
as s4
union
select 2
as category,
4000
as s1,
300
as s2,
1500
as s3,
1000
as s4
union
select 3
as category,
1000
as s1,
800
as s2,
1200
as s3,
600
as s4
union
select 4
as category,
4000
as s1,
1200
as s2,
1500
as s3,
700
as s4
union
select 5
as category,
1000
as s1,
800
as s2,
900
as s3,
300
as s4
union
select 6
as category,
5000
as s1,
1000
as s2,
1300
as s3,
500
as s4
union
select 7
as category,
1300
as s1,
1100
as s2,
700
as s3,
600
as s4
GO
.setResultSettings
'Index=1,
CategoryFields="[category]
ASC",
SeriesFields="[s1],[s2],[s3],[s4]",
ShowChart=true,
ShowToolbar=true,
Paging=true,
Split=300,
Chart="{stacked,stacked,stacked,stacked}",
RotX=324,
RotY=0,
RotZ=0,
Zoom=40.0,
ScaleData=true,
ShowLegend=true,
ShowGrid=true,
Title="2D
Stacked Column Chart",
PieExplode=0.0,
GroupSmallValues=true,
SmallValuesThreshold=3.0,
PieLabelDistance=3.0,
PieShowLines=false,
LineWidth=1.0,
Width=16.0,
Height=10.0,
Depth=4.0,
SeriesSpacing=0.5,
CategorySpacing=0.5,
Font="Arial-6",
TopColor="#D7DCF5",
BottomColor="#EBF0F5",
PanX=-5.6999993,
PanY=-5.799999,
Lighting=Bright,
View2D=true,
StackedPercent=true,
ShowValueAxis=true,
ShowCategoryAxis=true,
ShowSeriesAxis=false,
ValueAxisNumberFormat="###0",
CategoryAxisNumberFormat="#,##0",
NumericCategoryAxis=false,
MergeAxis=true,
SeriesAlias="default,default,default,default",
SeriesSubType=",,,",
SeriesColumnType="Cube,Cube,Cube,Cube",
SeriesMin="default,default,default,default",
SeriesMax="default,default,default,default",
SeriesColor="#008080,#808000,#993300,#3366FF",
SeriesFunctionMetaData="true,true,true,true",
LegendPosition=Top
Right,
LegendWidthType=Exact,
LegendWidth=100,
LegendHeightType=Fit,
LegendHeight=160,
ShowFixedCategoryCount=true,
FixedCategoryCount=0'
|