jQWidgets Forums

jQuery UI Widgets Forums Chart vertical border

This topic contains 9 replies, has 2 voices, and was last updated by  ivailo 9 years, 3 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • vertical border #82252

    mykola
    Participant

    Hi! Is it possible to draw a thin vertical threshold on the chart? Like a dotted horizontal red line in this example. I tried to draw it this way:

    bands: [{
        minValue: new Date(2016, 2, 4), maxValue: new Date(2016, 2, 4), fillColor: 'red', lineWidth: 2, dashStyle: '2,2'
    }],

    but failed, nothing was shown.

    vertical border #82264

    ivailo
    Participant

    Hi mykola,

    It’s possible.
    Here is a demo.

    If the settings of the demo doesn’t help in your case, please send a jsEditor link with working example of your code.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    vertical border #82275

    mykola
    Participant

    so, it’s possible only in flip mode?

    vertical border #82312

    mykola
    Participant

    Here is my example. No line. Can you help me?

    vertical border #82318

    ivailo
    Participant

    Hi mykola,

    In this case the closest variant is to add a minimum difference between your two dates used in the color band.
    Here is a demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    vertical border #82321

    mykola
    Participant

    this looks ugly

    vertical border #82330

    mykola
    Participant

    if I add, say another seriesGroup, like this:

    type: 'column',
    columnsMinWidth: 1, 
    columnsMaxWidth: 1,
    seriesGapPercent: 0,
    skipOverlappingPoints: false,
    series: [{ dataField: 'today', lineColor: 'red', fillColor: 'transparent', lineDashStyle: '2, 5'}]

    and add data for particular date giving it maximum value:
    + "2015-12-10 25\n"
    You can see it in this demo
    is it possible to make this line dashed?

    vertical border #82370

    ivailo
    Participant

    Hi mykola,

    As a workaround you can try an approach with overlaying of the color bands.
    Here is a demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    vertical border #82461

    mykola
    Participant

    Hi, ivailo.
    I tried your approach but it looks good only on this demo. In different situations it’s rendered differently. Especially when there’s a zooming in chart, then in different scales you get different results: the line either disappears or a double stroke can appear.

    vertical border #82513

    ivailo
    Participant

    Hi mykola,

    To avoid this behavior, probably you have to calculate the position and size of the overlaying color band.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.