ICC-Profile

 view release on metacpan or  search on metacpan

lib/ICC/Javascripts/rgraph/RGraph.svg.radar.js  view on Meta::CPAN

                                fill: prop.tickmarks === 'filledcircle' ? prop.colors[i] : prop.tickmarksFill,
                                stroke: prop.colors[i],
                                'stroke-width': prop.tickmarksLinewidth,
                                'clip-path': this.isTrace ? 'url(#trace-effect-clip)' : ''
                            }
                        });
                        
                        c.setAttribute('data-dataset', i);
                        c.setAttribute('data-index', j);
                    
                    
                    } else if (prop.tickmarks === 'rect' || prop.tickmarks === 'filledrect') {
                        
                        var halfTickmarkSize = prop.tickmarksSize / 2;
                        var fill = typeof prop.tickmarksFill === 'object' && prop.tickmarksFill[i] ? prop.tickmarksFill[i] : prop.tickmarksFill;
                        
                        var s = RG.SVG.create({
                            svg:  this.svg,
                            type: 'rect',
                            parent: group,
                            attr: {
                                x: this.coords2[i][j][0] - halfTickmarkSize,
                                y: this.coords2[i][j][1] - halfTickmarkSize,
                                width: prop.tickmarksSize,
                                height: prop.tickmarksSize,
                                fill: prop.tickmarks === 'filledrect' ? prop.colors[i] : fill,
                                stroke: prop.colors[i],
                                'stroke-width': prop.tickmarksLinewidth
                            }
                        });
                        
                        s.setAttribute('data-dataset', i);
                        s.setAttribute('data-index', j);
                    }
                }
            }
        };








        //
        // Draw the labels
        //
        this.drawLabels = function ()
        {
            var angles = this.angles2,
                prop   = this.properties,
                labels = prop.labels;

            for (var i=0,len=labels.length; i<len; ++i) {

                if (!labels[i]) {
                    continue;
                }

                var endpoint = RG.SVG.TRIG.getRadiusEndPoint({
                    angle: RG.SVG.TRIG.TWOPI / labels.length * i - RG.SVG.TRIG.HALFPI,
                    r: this.radius + 15
                });
                
                var x = endpoint[0] + this.centerx,
                    y = endpoint[1] + this.centery;

                //
                // Horizontal alignment

                if ((i / len) < 0.5) {
                    halign = 'left';
                } else {
                    halign = 'right';
                }

                //
                // Vertical alignment
                //
                if ((i / len) < 0.25 || (i / len) > 0.75) {
                    valign = 'bottom';
                } else {
                    valign = 'top';
                }

                // Specify the alignment for labels which are on the axes
                if ( (i / len) === 0 )    {halign = 'center';}
                if ( (i / len) === 0.25 ) {valign = 'center';}
                if ( (i / len) === 0.5 )  {halign = 'center';}
                if ( (i / len) === 0.75 ) {valign = 'center';}


                RG.SVG.text({
                    object: this,
                    svg:    this.svg,
                    parent: this.svg.all,
                    tag:    'labels',
                    text:   labels[i],
                    size:   typeof prop.labelsSize === 'number' ? prop.labelsSize : prop.textSize,
                    x:      x,
                    y:      y,
                    halign: halign,
                    valign: 'center',
                    color:  prop.labelsColor || prop.textColor,
                    bold:   typeof prop.labelsBold   === 'boolean' ? prop.labelsBold   : prop.textBold,
                    italic: typeof prop.labelsItalic === 'boolean' ? prop.labelsItalic : prop.textItalic,
                    font:   prop.labelsFont || prop.textFont
                });
            }
            
            
            
            
            
            
            
            
            
            
            

            // Draw the scale if required
            if (prop.scaleVisible) {
                for (var i=0; i<this.scale.labels.length; ++i) {
    
                    var x = this.centerx;



( run in 1.397 second using v1.01-cache-2.11-cpan-524268b4103 )