jQWidgets Forums
Forum Replies Created
-
Author
-
Hi!
I was check the api documentation. i am using a line Chart but i have a trouble.
i am using two functions.
the first one is to get the settings just like this:var getSettingsDefault = function(data){
var settings = {
title: “TITULO DE LA GRAFICA”,
description: “DESCRIPCIÓN DE LA GRAFICA”,
enableAnimations: true,
showLegend: true,
padding: { left: 5, top: 5, right: 11, bottom: 5 },
titlePadding: { left: 10, top: 0, right: 0, bottom: 10 },
source: data,
xAxis:
{
dataField: ‘nombre’,
unitInterval: 1,
tickMarks: { visible: true, interval: 1 },
gridLinesInterval: { visible: true, interval: 1 },
valuesOnTicks: false,
labels:
{ text: ‘Numero de semana<br>’}
},
valueAxis:
{
labels: {horizontalAlignment: ‘right’},
title: { text: ‘Monto<br>’ }
},
colorScheme: ‘scheme01’,
seriesGroups:
[
{
type: ‘line’,
series: [
{
dataField: ‘dataField’,
displayText: ‘displayText’,
symbolType: “square”,
labels:
{
visible: true,
backgroundColor: ‘#FEFEFE’,
backgroundOpacity: 0.2,
borderColor: ‘#7FC4EF’,
borderOpacity: 0.7,
formatSettings: {thousandSeparator:’,’, prefix:’$’},
padding: { left: 5, right: 5, top: 0, bottom: 0 }
}
},]
}
]
};
return settings;
}
the second one is for set the title and datafield where the chart is going to get the source.var GraficaMonto = function(data){
var s = getSettingsDefault(data);
s.title = “COBRANZA”;
s.description = “$ de Malas”;
s.valueAxis.title.text = ‘Pesos<br>’;
s.seriesGroups[0].series[0].dataField = ‘monto_malas’;
//s.seriesGroups[0].series[0].labels.formatSettings = {prefix:’$’};
s.seriesGroups[0].series[0].displayText = ‘$ de Malas’;
$(“#ContenedorGraficaMonto”).jqxChart(s);
}My question is, How can i set the formatSettings? because i am sending my data like numbers, but i need to show it in the page with de comma separator and the $ simbol.
I hope you can help me
best regards
-
AuthorPosts