jQuery UI Widgets Forums Chart stacked column chart negative values

This topic contains 1 reply, has 2 voices, and was last updated by  Christopher 7 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • stacked column chart negative values #86207

    atomic
    Participant

    Hi guys,

    My jqx stacked chart is not displaying negative values. Any ideas?
    thnaks

    chart.jqxChart({
    					title: '',
    					//description: final_energy_demand_fuel_shares + ' ' + sector,
    					description: 'el. mix shares',
    					enableAnimations: true,
    					showLegend: true,
    					theme: theme,
    					 
    					padding: { left: 5, top: 5, right: 5, bottom: 5 },
    					titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
    					source: nestedAdapterChart,
    					categoryAxis:
    						{
    							text: 'Category Axis',
    							type: 'basic',
    							textRotationAngle: 0,
    							dataField: 'phase',
    							showTickMarks: true,
    							tickMarksInterval: 1,
    							tickMarksColor: '#888888',
    							unitInterval: 1,
    							showGridLines: false,
    							gridLinesInterval: 1,
    							gridLinesColor: '#888888',
    							axisSize: 'auto'
    						},
    					colorScheme: 'scheme01',
    					seriesGroups:
    						[
    							{                                                                    
    								type: 'stackedcolumn',
    								columnsGapPercent: 100,
    								//seriesGapPercent: 10,
    								valueAxis:
    								{
    									unitInterval: 20,
    									minValue: -100,
    									maxValue: 100,
    									displayValueAxis: true,
    									description: '%',
    									axisSize: 'auto',
    									tickMarksColor: '#888888'
    								},
    								series: [
    	                            		{ dataField: 'Coal', displayText: coal, color: clCoal},
    	                            		{ dataField: 'Oil', displayText: oil, color: clOil},
       	                                    { dataField: 'Hydro', displayText: hydro, color: clHydro},
    	                            		{ dataField: 'Gas', displayText: gas, color: clGas},
    	                                    { dataField: 'Biofuels', displayText: biofuels, color: clBiofuels},
    	                            		{ dataField: 'Solar', displayText: solar, color: clSolar},
    	                                    { dataField: 'Peat', displayText: peat, color: clPeat},
    	                                    { dataField: 'Waste', displayText: waste, color: clWaste},
    	                                    { dataField: 'Oil_shale', displayText: oil_shale, color: clOil_shale},
                                            { dataField: 'Wind', displayText: wind, color: clWind},
                                            { dataField: 'Geothermal', displayText: geothermal, color: clGeothermal},
                                            { dataField: 'Nuclear', displayText: nuclear, color: clNuclear},
                                            { dataField: 'UD', displayText: ud, color: '#ff0000'},
                                            { dataField: 'importexport', displayText: importexport, color: '#0000ff'}
    	                                ]
    								//	series: series_fuels
    							}
    						]
    					});
    stacked column chart negative values #86216

    Christopher
    Participant

    Hi atomic,

    We tested your code with other data source and the jqxChart displays negative values. So your code is correct. Check your data if it actually contains negative values that should be displayed. Here is a demo of your code working with our data source:
    https://www.jseditor.io/?key=xb-chart-1

    Best Regards,
    Christopher

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.