jQuery UI Widgets Forums Chart Problem with export chart to image

This topic contains 2 replies, has 2 voices, and was last updated by  Klaus H 7 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • Klaus H
    Participant

    Hello,

    I am trying to implement a chart in which the user can switch the display of the chart from a classical line chart to a view in which he only sees the data points but no lines.

    I do this by changing 4 properties:

    chart.seriesGroups[sgind].series[seriesind].lineWidth = 0;
    chart.seriesGroups[sgind].series[seriesind].lineWidthSelected = 0;
    chart.seriesGroups[sgind].series[seriesind].symbolSize = 4;
    chart.seriesGroups[sgind].series[seriesind].symbolType = 'circle';

    or

    chart.seriesGroups[sgind].series[seriesind].lineWidth = 2;
    chart.seriesGroups[sgind].series[seriesind].lineWidthSelected = 2;
    chart.seriesGroups[sgind].series[seriesind].symbolSize = null;
    chart.seriesGroups[sgind].series[seriesind].symbolType = null;

    That works fine. I also have to provide the possibility to export the chart as a png file. The line graph exports fine, but the version with lineWidth = 0 shows the symbol as a circle but additionally shows the line connecting the dots also. If I initiate the chart with the 4 properties to display the data points without a line, the png file still shows the line, so I don’t think it is a side effect from the possibility to switch. Is there another property I have to set? For me it seems the export uses the default lineWidth value, so for example if I do not provide a lineWidth or set lineWidth to null when initializing the chart in the browser, the chart looks like when I export it with lineWidth 0.

    Could you please check this behaviour?

    Best Regards
    Klaus

    Problem with export chart to image #100429

    Martin
    Participant

    Hello Klaus,

    You can change the type of the chart to scatter, instead of changing the line’s width.
    chart.seriesGroups[0].type = 'scatter';
    This will work for displaying the data points only, also in the .png file.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Problem with export chart to image #100430

    Klaus H
    Participant

    Hello Martin,

    I did not see the scatter chart example, that works perfectly. Thank you 🙂

    Best regards
    Klaus

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

You must be logged in to reply to this topic.