List<string> formattedData = rawData.Select(d => d.ToString(“C2”, CultureInfo.GetCultureInfo(“es-MX”))).ToList();
var barDataSet1 = new BarDataSet
{
Data = rawData.Cast<object>().ToArray(), // ChartJS still uses the raw data internally
Formatted = formattedData.ToArray() // This array is used for display (tooltips, datalabels)
};
barDataSet1.BackgroundColor = new[] { Color.LightSeaGreen, Color.ForestGreen, Color.LightYellow, Color.Orange, Color.IndianRed, Color.Red }; //randomColors1.ToArray();
barDataSet1.BorderColor = null;
barDataSet1.Data = ConvertirCadenaADouble(Cadena_Cant_Cartera_Barras.ToString());
barDataSet1.HoverBackgroundColor = null; // null;
barDataSet1.Label = null;
string[] vs1 = Cadena_Cartera_Vencimiento_Barras.Split(‘,’).ToArray();
barDataSet1.Formatted = formattedData.ToArray();
chartJS2.Labels = vs1;
chartJS2.DataSets.Add(barDataSet1);
I do the formatting and still the currency format does not change. What do I need to do? My version is Wisej 2.54
Unfortunately, we no longer support Wisej 2. Therefore this question is out of the scope of what we cover on this support forum.
This does not work with ChartJS2 (wisej-2-chartjs or wisej-3-chartjs) You would need to use ChartJs3 (wisej-2-chartjs3 or wisej-3-chartjs3).
Thanks for replying, but I downloaded Wisej-2-chartjs3 and it’s giving me errors. I know how to load the data into a Chart.js file; sometimes it works, sometimes it doesn’t. I get this error message visually in the Chart.js component: “chartdatalabels is not defined chartjs3 Wisej”.
I’m stuck on what to change or what I’m missing to make it work correctly. I’d rather go back to the Wisej-2-chartjs2 version.
Thank you very much for your help.
Please login first to submit.
