jQWidgets Forums

jQuery UI Widgets Forums Chart 2 Series in one Chart

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • 2 Series in one Chart #59359

    simcon94
    Participant

    Hi,
    i have two series in one Chart. One Column type series, one line type series.
    When i make the valueAxis -> axisSize: ‘auto’, then i have two Axis.
    When i set the Axis (both) with min and maxValue, then it works…..

    How can i do, that the chart has only one Y-Axis? But i must have autoSize…..

    
    seriesGroups:
                        [
                            {
                                type: 'column',
                                showLabels: false, // no Labels !
                                symbolType: 'none',
                                valueAxis:
                                {
                                    description: '@Html.Raw(Model.Unit)',
                                    //axisSize: 'auto',
                                    tickMarksColor: '#888888'
                                    ,unitInterval: 1
                                    ,minValue: 0
                                    ,maxValue: 5
                                },
                                series: [{
                                        dataField: 'Value',
                                        displayText: 'EnPI Einsatzwert',
                                        colorFunction: function(value, itemIndex, serie, group) { //console.log(value);
                                            return (value < 0) ? '#CC1133' : '#55CC55';
                                        }
                                    }, {
                                        dataField: 'ValueGood',
                                        displayText: 'EnPI Gutwert',
                                        colorFunction: function(value, itemIndex, serie, group) {
                                            return (value < @Model.AverageValue[1].ToString(CultureInfo.InvariantCulture)) ? '#e50000' : '#55CC55';
                                        }
    
                                        
                                    }
                                ]
                            }
                            @if (Model.Compare)
                            {
                                @Html.Raw(",{" +
                                            "type: 'line'" +
                                            ", showLabels: false" +
                                            ", symbolType: 'none'" +
                                            //", valueAxis: {tickMarksColor: '#888888',displayValueAxis: false}" +
                                            ",series: [{dataField: 'ValueC', displayText: 'EnPI Vergleichswert'}]" +
                                            "}")
                            }
                            @if (Model.Average)
                                {
                                    @Html.Raw(",{" +
                                                "type: 'line'" +
                                                ", showLabels: false"+
                                                ", symbolType: 'none'"+
                                                ", valueAxis: {tickMarksColor: '#888888',displayValueAxis: false,unitInterval: 1,minValue: 0,maxValue: 5}"+
                                                ",series: [{dataField: 'AvgVal', displayText: 'Mittelwert'}" +
                                                        ",{dataField: 'AvgValUp', displayText: 'Mittelwert Obergrenze'}" +
                                                        ",{dataField: 'AvgValDown', displayText: 'Mittelwert Untergrenze'}]" +
                                              "}")
                                }                        
                        ]
    
    2 Series in one Chart #59403

    Nadezhda
    Participant

    Hello simcon94,

    You can set the Axis (both) with “minValue” and “maxValue” and hide one of them with visible property (as “visible: false”).

    Best Regards,
    Nadezhda

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

    2 Series in one Chart #59462

    simcon94
    Participant

    Thanks…it works.
    So i have a other problem:
    How can i set the line series to start painting at the y-axis directly?
    Is there an Offset?

    2 Series in one Chart #59464

    Nadezhda
    Participant

    Hi simcon94,

    You can use properties “unitInterval”, “minValue” and “maxValue” to set the line.

    Best Regards,
    Nadezhda

    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.