Commit c0825bf2 authored by GoshaZotov's avatar GoshaZotov

draw 3d line charts with gradient colors

parent 5f2be255
......@@ -3756,7 +3756,7 @@ drawLineChart.prototype =
//todo возможно стоит проверить fill.type на FILL_TYPE_NOFILL и рисовать отдельно границы, если они заданы!
//brush = pen.Fill;
if(brush.fill.color === undefined)
if(brush.fill.color === undefined && brush.fill.colors === undefined)
return;
if(k !== 2)
......@@ -3769,7 +3769,9 @@ drawLineChart.prototype =
else
cColorMod.val = 35000;
cColorMod.name = "shade";
duplicateBrush.fill.color.Mods.addMod(cColorMod);
this._addColorMods(cColorMod, duplicateBrush)
duplicateBrush.calculate(props.theme, props.slide, props.layout, props.master, new AscFormat.CUniColor().RGBA);
pen = AscFormat.CreatePenFromParams(duplicateBrush, undefined, undefined, undefined, undefined, 0.1);
//pen.setFill(duplicateBrush);
......@@ -3780,6 +3782,26 @@ drawLineChart.prototype =
pen = AscFormat.CreatePenFromParams(brush, undefined, undefined, undefined, undefined, 0.1);
this.cChartDrawer.drawPath(path, pen, brush);
}
},
_addColorMods: function(cColorMod, duplicateBrush)
{
if(duplicateBrush.fill.color)
{
duplicateBrush.fill.color.Mods.addMod(cColorMod);
}
else
{
for(var i = 0; i < duplicateBrush.fill.colors.length; i++)
{
if(duplicateBrush.fill.colors[i].color.Mods === null)
{
duplicateBrush.fill.colors[i].color.Mods = new AscFormat.CColorModifiers();
}
duplicateBrush.fill.colors[i].color.Mods.addMod(cColorMod);
}
}
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment