jQWidgets Forums
jQuery UI Widgets › Forums › Chart › 2 Series in one Chart
Tagged: chart, jqxChart, two Axis, two series
This topic contains 3 replies, has 2 voices, and was last updated by Nadezhda 10 years, 9 months ago.
-
Author2 Series in one Chart Posts
-
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'}]" + "}") } ]
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,
NadezhdajQWidgets team
http://www.jqwidgets.com/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?Hi simcon94,
You can use properties “unitInterval”, “minValue” and “maxValue” to set the line.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.