Jump to content

 

Photo

Chart is plotting wrongly between (4.5.3.1 and 4.1.4.0 trail version)


  • Please log in to reply
2 replies to this topic

#1 shiva

shiva

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male
  • Location:Mysore, India

Posted 04 April 2012 - 01:25 PM

Hi All.
I have developed silverlight application using 4.1.4.0 trail version. Now we have visifire chart(4.5.3.1 licensed version). Both of them are plotting charts differenly.

Code behind which we are using for plotting chart. And refer the image attached here

for (int k = 0; k < 2; k++)
{
if (k == 0)
{
dataPoint = new Visifire.Charts.DataPoint();
dataPoint.Color = new SolidColorBrush(Colors.Orange);
dataPoint.LabelEnabled = true;
string strLabelText = string.Format("{0}{1}", Conversions.ConvertToString(list[k].Orange), "%");
dataPoint.LabelText = strLabelText;
dataPoint.ToolTipText = strLabelText;

dataPoint.LabelFontColor = new SolidColorBrush(Colors.Black);
dataPoint.AxisXLabel = string.Empty;
dataPoint.Width = 30;
dataPoint.XValue = 0;
dataPoint.YValue = list[k].Orange;
dataSeries.DataPoints.Add(dataPoint);
}
else if (k == 1)
{
List<double> lstValue = new List<double>();
lstValue.Add(list[k].Yellow);
lstValue.Add(list[k].Green);

double dYellow = lstOutValue[0];
double dGreen = lstOutValue[1];

if (dYellow > 100)
{
dataSeries.RenderAs = RenderAs.StackedColumn;
rdBarChart.AxesY[0].AxisMaximum = 100;
dYellow = 100;
}
else
{
rdBarChart.AxesY[0].AxisMaximum = null;
dataSeries.RenderAs = RenderAs.StackedColumn100;
}

// First part
dataPoint = new Visifire.Charts.DataPoint();
dataPoint.Color = new SolidColorBrush(Color.FromArgb(255, 30, 144, 255)); // blue
dataPoint.LabelFontColor = new SolidColorBrush(Colors.Black);
dataPoint.LabelEnabled = true;

string strLabelTextBlue = string.Format("{0}{1}", Conversions.ConvertToString(dYellow), "%");
dataPoint.LabelText = strLabelTextBlue;

dataPoint.AxisXLabel = string.Empty;
dataPoint.Width = 30;
dataPoint.XValue = 2;
dataPoint.YValue = dYellow;
dataPoint.ToolTipText = strLabelTextBlue;
dataSeries.DataPoints.Add(dataPoint);

// Second part
if (dGreen != 0)
{
dataPoint = new Visifire.Charts.DataPoint();
if (list[k].Green < 0)
dataPoint.Color = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0)); // red
else
dataPoint.Color = new SolidColorBrush(Color.FromArgb(255, 0, 128, 0)); // green

dataPoint.LabelFontColor = new SolidColorBrush(Colors.Black);
dataPoint.LabelEnabled = true;

string strLabelText = string.Format("{0}{1}", Conversions.ConvertToString(dGreen), "%");
dataPoint.LabelText = strLabelText;
dataPoint.ToolTipText = strLabelText;

dataPoint.AxisXLabel = string.Empty;
dataPoint.XValue = 2;
dataPoint.Width = 30;
dataPoint.YValue = dGreen;
dataSeries.DataPoints.Add(dataPoint);
}
}
}

Attached Files



#2 vivek

vivek

    Advanced Member

  • Team Visifire
  • PipPipPip
  • 3,588 posts
  • Gender:Male
  • Location:Bangalore

Posted 05 April 2012 - 04:53 AM

Shiva,

We are looking into the issue. We will get back to you ASAP.

Regards,
Vivek
Team Visifire


#3 shoaib

shoaib

    Advanced Member

  • Members
  • PipPipPip
  • 924 posts
  • Gender:Male
  • Location:Bangalore

Posted 06 April 2012 - 01:44 PM

Shiva,

I think you have created a similar post in our Ticket also. We will continue our discussion there.

Regards,
Shoaib




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users