此地图中存在州和领地,先是州线,然后是领地线,当我用一种颜色填充州线时,好像地图的某些部分(都在州内)都没有采用填充的颜色,而是保留区域填充的原始颜色。因此,似乎这些特定区域的领土填充会覆盖状态行的填充。
不再有折线或多边形对象,我将其转换并将其转换为路径。
我拥有的CSS如下:
DECLARE @fiscalPeriod smalldatetime,
@openingUnits float,
@divPrice money,
@divFactor float,
@drip float,
@endingUnits float
DECLARE divCursor CURSOR FOR
SELECT [FiscalPeriod]
,[SharePrice]
,[Rate]
FROM [dbo].[Pricing]
ORDER BY FiscalPeriod
OPEN divCursor
FETCH NEXT FROM divCursor
INTO @fiscalPeriod, @divPrice, @divFactor
SET @openingUnits = 1
SET @drip = @openingUnits/@divPrice*@divFactor
SET @endingUnits = @openingUnits + @drip
SELECT FiscalPeriod = @fiscalPeriod, OpeningUnits = @openingUnits, DivPrice = @divPrice, DivFactor = @divFactor, DRIP = @drip, EndingUnits = @openingUnits + @drip
INTO #Temp
FETCH NEXT FROM divCursor
INTO @fiscalPeriod, @divPrice, @divFactor
WHILE @@FETCH_STATUS = 0
BEGIN
SET @openingUnits = @endingUnits
SET @drip = @openingUnits/@divPrice*@divFactor
SET @endingUnits = @openingUnits + @drip
INSERT INTO #Temp (FiscalPeriod, OpeningUnits, DivPrice, DivFactor, DRIP, EndingUnits)
VALUES (@fiscalPeriod, @openingUnits, @divPrice, @divFactor, @drip, @endingUnits)
FETCH NEXT FROM divCursor
INTO @fiscalPeriod, @divPrice, @divFactor
END
CLOSE divCursor
DEALLOCATE divCursor
SELECT * FROM #Temp
DROP TABLE #Temp
图像在这里可用:
我愿意与会PM我的人分享SVG
这是来自SVG的俄勒冈州和密苏里州的代码:
.territories
{
isolation:isolate;
}
.at
{
fill:#bcd98d;
stroke:#80bc58;
stroke-linecap:round;
stroke-linejoin:round;
}
.at.contested {
}
.states
{
mix-blend-mode:color-burn;
}
.state-line
{
fill:blue;
stroke:black;
stroke-width:1.2px;
stroke-linecap:round;
stroke-linejoin:round;
}
#striped
{
mask: url(#mask-stripe);
fill:red;
}
答案 0 :(得分:0)
查看后,我将删除该答案-所发布的代码并非错误所在。运行下面的代码片段以查看。如果您可以张贴完整的代码或指向它的链接,小提琴或Codepen或其他东西,我们可能会提供帮助。
library(tidyverse)
df2 <- df %>%
mutate(lead_v1 = lead(v1), lead_v2 = lead(v2), dv1 = (lead_v1-v1)/v1*100, dv2 = lead_v2-v2) %>%
select(c(1,3,4,9,10)) %>%
filter(row_number() %% 2 != 0)
> df2
Pack row col dv1 dv2
1 P1 1 1 0.3908158 0.3455
2 P1 1 2 -0.2428363 -0.2392
3 P1 1 3 -0.2184996 -0.0779
>
.at {
fill: rgba(255, 0, 0, 0.1);
stroke: rgba(0, 0, 255, 0.1);
stroke-width: 2;
}