Jump to content
JChartFX Community
  • 0

How to remove lineargrandients and more


jorcama

Question

Hi,

We are begining to develop with jChartFX in a demo product, we are using something similiar to this graph: http://www.jchartfx.com/demo.aspx#332c1395-7dc5-447d-8b92-6f93d47a2e06

But our application dont use nor gradients nor borders,

We would like to remove the main border container.

Also all the linear gradients: The background grandient, and the bar gradients.

I get my goal with this ugly code, bug if we want to use jChartFX in our final product, we need another solution.

Thanks

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

The code is:


function removeUglyChartFx() {
    jQuery('svg.jchartfx').each(function (index, value) {
        var removedChildren = new Array
        for (var i = 0; i this.childElementCount; i++) {
            if (this.childNodes.nodeName != 'svg') {
                removedChildren.push(this.childNodes);
            }
        }
        for (var i = 0; i removedChildren.length; i++) {
            this.removeChild(removedChildren);
        }
        removeChildrenByNodeName('stop', this);
    });
    //Quita la marca de agua pero tb la leyenda.
    //jQuery('.LegendItem').empty(); }
    function removeChildrenByNodeName(nodeName, svgObject) {
        var removedChildren = new Array
        for (var i = 0; i svgObject.childElementCount; i++) {
            if (svgObject.childNodes.nodeName == nodeName) {
                removedChildren.push(svgObject.childNodes);
            } else {
                removeChildrenByNodeName(nodeName, svgObject.childNodes);
            }
        }
        for (var i = 0; i(removedChildren.length - 1); i++) {
            svgObject.removeChild(removedChildren);
        }
    }

Link to comment
Share on other sites

  • 0

 If you want a simpler looking chart you should use jchartfx.coreBasic instead of jchartfx.coreVector, this will give you simpler bars (no gradients or round bars) and a solid background.

Please note that removing or modifying the watermark is not supported under the license for our free component.

JuanC

Link to comment
Share on other sites

  • 0

Thank you.

Using jchartfx.coreBasic, gradients and borders does not appear in bars charts.

However we are using a 3d pie chart (the second example from gallery in section Pie-Doughnut-Pyramid) and the gradient for the border of the pie is still there...

http://www.jchartfx.com/JChartFXGallery/galleryimages/ThreeDPie.png

How can we remove this lineargradient?

regards

Link to comment
Share on other sites

  • 0

You might want to try turning off the shadows in the View3D object as follows

chart1.getView3D().setShadow(cfx.Shadow.None);

The only drawback is that the color used for the "front" of the slices will be the same used for the "top", we are investigating whether to add a Shadow enumeration to do this or change Fixed to do it and have Realistic to do the gradient (Fixed and Realistic are the other enumeration values for Shadow along with None)

Regards,

JuanC

post-2107-13939743081274_thumb.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...