You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/06/06 00:23:46 UTC

[GitHub] [echarts] linghaoSu commented on issue #17152: [Bug] Multi-series column charts extend beyond the x axis edge

linghaoSu commented on issue #17152:
URL: https://github.com/apache/echarts/issues/17152#issuecomment-1146917135

   Hi, @Shaq76  maybe you can specify xAxis.max function to caculate suitable max value
   ```typescript
   let data = [
   	["", "Val1", "Val2"],
   	[1, 6545, 6545],
   	[2, 2666, 5332],
   	[, 1002, 4008]
   ];
   
    option = {
   	dataset: { source: data },
   	xAxis: { type: 'value', max:(v) => v.max+1 }, // 
   	yAxis: {},
   	series: [
   		{
   			type: 'bar',
   			encode: { x:0, y:1 }
   		},
   		{
   			type: 'bar',
   			encode: { x:0, y:2 },
   		}
   	]
   };
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org