Results 1 to 2 of 2

Thread: Chart - Dashed Line

  1. #1
    Sencha Premium User
    Join Date
    Sep 2016
    Posts
    1

    Default Chart - Dashed Line

    Hi,

    I want to have partially dashed line in our chart; meaning the line between the two last data points should be dashed.
    Therefore I wrote a renderer function which changes the style of the markers and lines. However, no line seems to be dashed.
    I guess, I set the lineDash attribute at the wrong place, but can't seem to figure out the right way.

    Here is a code snippet of one series:

    Code:
    series: [
    {
                        type: 'line',
                        renderer: function(sprite, config, rendererData, index) {
                            var store = rendererData.store;
                            var storeItems = store.getData().items;
                            var changes = {};
                            if( true ) { // for testing purposes set to true
                                switch( config.type ) {
                                    case 'line':
                                        changes.strokeStyle = 'tomato';
                                        changes.lineDash = [10, 10]; // also tried sprite.attr.lineDash and config.lineDash
                                        break;
                                    case 'marker':
                                        changes.strokeSyle = 'tomato';
                                        changes.fillStyle = 'aliceblue';
                                        break;
                                }
                            }
    
    
    
    
                            return changes;
                        },
                        highlight: {
                            fillStyle: '#000',
                            radius: 5,
                            lineWidth: 2,
                            strokeStyle: '#fff'
                        },
                        marker: {
                            radius: 3,
                            lineWidth: 1
                        },
                        title: 'Forderungen',
                        tooltip: {
                            trackMouse: true,
                            showDelay: 0,
                            dismissDelay: 0,
                            hideDelay: 0,
                            renderer: 'onFortschrittSeriesTooltipRender'
                        },
                        xField: 'datum',
                        yField: [
                            'rechnung_forderung_prozent'
                        ],
                        nullStyle: 'connect'
                    }
    ]
    Thank you,
    Dominik

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

Similar Threads

  1. Line graph dashed but legend item is not
    By LTippet in forum Sencha Ext JS Q&A
    Replies: 1
    Last Post: 31 Jan 2014, 2:57 PM
  2. How to give gradient color to bar chart and dashed line to background
    By vijayakumar84 in forum Sencha Touch 2.x: Q&A
    Replies: 0
    Last Post: 26 Feb 2013, 11:30 PM
  3. Help to draw dashed line
    By blackcat in forum Ext: Discussion
    Replies: 3
    Last Post: 4 Nov 2011, 1:49 AM
  4. dotted or dashed line chart
    By madhu_g in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 7 Apr 2011, 10:40 PM
  5. dotted .vs. dashed line charts
    By databass in forum Sencha GXT Q&A
    Replies: 6
    Last Post: 6 Apr 2011, 7:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •