airik

Aligning Multiple Spark Bar Charts

Recommended Posts

In the sample gallery there is a sample showing spark bar chart with weather data. In each case all the bars are left aligned (vertically) to a datum and the captions right aligned to the same datum. How was this achieved? I have 5 charts with different captions and the bars won't align.

 

Is there a way to enter multiple series in the same chart or a way to fix the caption width?

Edited by airik

Share this post


Link to post
Share on other sites
Guest Sumedh

In the sample gallery there is a sample showing spark bar chart with weather data. In each case all the bars are left aligned (vertically) to a datum and the captions right aligned to the same datum. How was this achieved? I have 5 charts with different captions and the bars won't align.

 

Is there a way to enter multiple series in the same chart or a way to fix the caption width?

 

Hi,

 

Can you elaborate on your requirement a bit more?

 

Also, adding multiple series in Spark-Column chart is not possible.

 

Awaiting your response.

Share this post


Link to post
Share on other sites

Sure:

 

I've enclosed an image of my non-aligned layout and the sample you show which is nicely aligned

 

I wish to set up multiple spark bar charts so they line up vertically such that each bar has the same width and each series starts and ends under the series above it.

This will require the captions to not shift the start of the series as it is currently doing in my screenshot.

 

 

Hi,

 

Can you elaborate on your requirement a bit more?

 

Also, adding multiple series in Spark-Column chart is not possible.

 

Awaiting your response.

post-28389-0-63714800-1340808569_thumb.png

Edited by airik

Share this post


Link to post
Share on other sites
Guest Sumedh

Sure:

 

I've enclosed an image of my non-aligned layout and the sample you show which is nicely aligned

 

I wish to set up multiple spark bar charts so they line up vertically such that each bar has the same width and each series starts and ends under the series above it.

This will require the captions to not shift the start of the series as it is currently doing in my screenshot.

 

 

 

 

Hi,

 

You would need to render 4 Spark Column charts in separate 4 divs with equal data-set elements.

 

Please find attached illustration for your reference.

SparkColumn_Chart.zip

Share this post


Link to post
Share on other sites

I understand each must have a separate container and this is much how I setup my code.

Taking what you sent me I can see the columns are not aligned. If I use a larger caption name it becomes more evident (see the attached screen shot)

I want all the bars to line up with each other and preferably when the chart width is set to 100% and re-sizes.

 

To achieve this there would need to be some way to force the width of a caption.

 

Hi,

 

You would need to render 4 Spark Column charts in separate 4 divs with equal data-set elements.

 

Please find attached illustration for your reference.

post-28389-0-73117300-1340900766_thumb.png

post-28389-0-40460700-1340901132_thumb.png

Share this post


Link to post
Share on other sites
Guest Sumedh

I understand each must have a separate container and this is much how I setup my code.

Taking what you sent me I can see the columns are not aligned. If I use a larger caption name it becomes more evident (see the attached screen shot)

I want all the bars to line up with each other and preferably when the chart width is set to 100% and re-sizes.

 

To achieve this there would need to be some way to force the width of a caption.

 

 

 

Hi,

 

You would need to set leftCanvasMargin attribute under the chart element.

 

Also, you would need to configure the chart dimensions. Set chart width upto 200px.

 

Ref. Code:

<chart ... leftCanvasMargin='100'>

 

Please find attached screen-shot for your reference.

 

Please find attached screen-shot for your reference.

post-24802-0-73886000-1340965692_thumb.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now