Welcome Guest Search | Active Topics |

How to make unique String format in each Data
haruhi90
#1 Posted : Monday, October 21, 2013 12:00:06 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/20/2013(UTC)
Posts: 4

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
Good morning all,
I want to ask about how to show unique stringFormat in each data


Here the sample from http://www.jqchart.com/j...t/ChartTypes/LineChart,

series: [
{
type: 'line',
title: 'Series 1',
strokeStyle: '#418CF0',
lineWidth : 2,
data: [62, 70, 68, 58, 52, 60, 48],
labels: { stringFormat: '%d K', font: '12px sans-serif' }
}

a.k.a :
62 K
70 M
68 N
etc

Thankyou for your attention
:)
Dragan
#2 Posted : Tuesday, October 22, 2013 5:35:30 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
You can use 'DataPointLabelCreating' event:
http://www.jqchart.com/jquery/chart/CustomizingChart/DataPointLabelCreatingEvent
Best Regards,
Dragan Matek
jqChart Inc.
1 user thanked Dragan for this useful post.
haruhi90 on 10/24/2013(UTC)
haruhi90
#3 Posted : Thursday, October 24, 2013 5:31:52 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/20/2013(UTC)
Posts: 4

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
dragan wrote:


Thank you so much! it was really help :)

I have another question :).

Based on http://www.jqchart.com/j.../AxisLabelCreatingEvent
from tutorial, we can change format on left axis label..

How to change format bottom of axisLabel to number/money ?
haruhi90
#4 Posted : Thursday, October 24, 2013 5:42:05 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/20/2013(UTC)
Posts: 4

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
haruhi90 wrote:
dragan wrote:


Thank you so much! it was really help :)

I have another question :).

Based on http://www.jqchart.com/j.../AxisLabelCreatingEvent
from tutorial, we can change format on left axis label..

How to change format bottom of axisLabel to number/money ?


$('#jqChart').bind('axisLabelCreating', function (event, data) {
if (data.context.axis.location == 'left') {
data.text = '$' + addCommas(data.text);
}
});


if (data.context.axis.location == 'left') {

hahaha, i tried change this line to "bottom" and it was work!.



Thank you
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.104 seconds.