jQuery UI Widgets Forums Chart Summarizing settings

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 11 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Summarizing settings #26166

    HangWire
    Participant

    Is it possible to summarize settings of a diagram? I am creating diagram data dynamically in PHP (with CodeIgniter Framework) and passing them to JavaScript via JSON, but some of the diagram settings are equal.

    var settings = {
    title: '',
    description: 'Antwortzeiten am ',
    enableAnimations: false,
    showLegend: true,
    showBorderLine: false,
    columnSeriesOverlap: true,
    padding: {left: 10, top: 5, right: 10, bottom: 5},
    titlePadding: {left: 90, top: 0, right: 0, bottom: 10},
    source: awz_dataAdapter,
    categoryAxis:
    { ...

    Is it possible to make an array only containing

    enableAnimations: false,
    showLegend: true,
    showBorderLine: false,
    columnSeriesOverlap: true

    and add it to the settings?

    Summarizing settings #26170

    Dimitar
    Participant

    Hello HangWire,

    You may put these common properties in a separate object, e.g.:

    var commonSettings = {
    enableAnimations: false,
    showLegend: true,
    showBorderLine: false,
    columnSeriesOverlap: true
    };

    and apply them after the chart’s initialization, i.e.:

    $("#jqxChart").jqxChart({ /*initialization*/ });
    $("#jqxChart").jqxChart(commonSettings);

    Best Regards,
    Dimitar

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

    Summarizing settings #26171

    HangWire
    Participant

    Thank you, but when I now use

    var commonSettings = {
    enableAnimations: false,
    showLegend: true,
    showBorderLine: false,
    columnSeriesOverlap: true,
    categoryAxis:{
    unitInterval: 1
    }
    };

    categoryAxis from Initialization is overwritten. Any ways to avoid this?

    Summarizing settings #26245

    Dimitar
    Participant

    Hi HangWire,

    In this case, only the unitInterval property should be changed. We tested with the latest version of jQWidgets (2.9.3) and encountered no issue.

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.