Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Numeric Axis Labels on LineChart (Read 23651 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Numeric Axis Labels on LineChart
Reply #15 - Mar 13th, 2008 at 4:48pm
Print Post  
It's not the intended behavior, but I can't reproduce that. Does it happen with the initialization code from your previous post?

Thanks
  
Back to top
 
IP Logged
 
DaveDeakins
YaBB Newbies
*
Offline



Posts: 15
Joined: Mar 5th, 2008
Re: Numeric Axis Labels on LineChart
Reply #16 - Mar 13th, 2008 at 7:59pm
Print Post  
An additional question: how do I change the font for the date labels on the X axis?  I tried several of the font-related properties, but I seemed to have trouble finding the right one.  Also, how do I change the font for YGridLabels?

Thanks,
-Dave
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Numeric Axis Labels on LineChart
Reply #17 - Mar 13th, 2008 at 8:20pm
Print Post  
Try with XAxisSettings.LabelFont and YAxisSettings.LabelFont. At this time the same font is used for both the axis and grid labels.

Stoyan
  
Back to top
 
IP Logged
 
DaveDeakins
YaBB Newbies
*
Offline



Posts: 15
Joined: Mar 5th, 2008
Re: Numeric Axis Labels on LineChart
Reply #18 - Mar 17th, 2008 at 3:56pm
Print Post  
Here is a sample of code that triggers the NullReferenceException that I mentioned previously.  When the second StartDateTime statement is executed, MindFusion.Charting.ChartMeasurer.CalculateTextSize throws.

    MindFusion::Charting::WinForms::LineChart ^ chart = gcnew MindFusion::Charting::WinForms::LineChart;

    chart->Location = System::Drawing::Point(50, 275);
    chart->Size = Drawing::Size(350, 210);
    chart->LineType = MindFusion::Charting::LineTypes::Line;

    chart->XAxisSettings->DrawZero = true;
    chart->XAxisSettings->AxisLabelType = MindFusion::Charting::AxisLabelType::AutoScale;
    chart->XAxisSettings->StartDateTime = System::DateTime(2008,2,10);
    chart->XAxisSettings->EndDateTime = System::DateTime(2008,3,10);
    chart->XAxisSettings->TimeSpan = (chart->XAxisSettings->EndDateTime - chart->XAxisSettings->StartDateTime);
    chart->XAxisSettings->NumberFormat = MindFusion::Charting::NumberFormat::ShortDate
;
    chart->XAxisSettings->AxisLength = 250;

    chart->XAxisSettings->StartDateTime = System::DateTime(2008,4,1);
    chart->XAxisSettings->EndDateTime = System::DateTime(2008,4,30);

    page1_.Controls->Add( chart );

Regarding the fonts for the axis labels, X/YAxisSettings->LabelFont works well.  Thanks for the information!

-Dave
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Numeric Axis Labels on LineChart
Reply #19 - Mar 17th, 2008 at 4:10pm
Print Post  
Thank you for the code. Could you also post the values from the date array?

Thanks,
Stoyan
  
Back to top
 
IP Logged
 
DaveDeakins
YaBB Newbies
*
Offline



Posts: 15
Joined: Mar 5th, 2008
Re: Numeric Axis Labels on LineChart
Reply #20 - Mar 17th, 2008 at 4:31pm
Print Post  
Yes, the data is as before:

    System::Collections::Generic::List<System::DateTime> ^ xData1 = gcnew System::Collections::Generic::List<System::DateTime>();
    xData1->Add( System::DateTime(2008,3,9) );
    xData1->Add( System::DateTime(2008,3,1) );
    xData1->Add( System::DateTime(2008,3,5) );

    System::Collections::Generic::List<System::Collections::Generic::List<System::Da
teTime> ^> ^ xData = gcnew System::Collections::Generic::List<System::Collections::Generic::List<System::Da
teTime> ^>();
    xData->Add( xData1 );
    chart->XData = xData;

    System::Collections::Generic::List<int> ^ yData1 = gcnew System::Collections::Generic::List<int>();
    yData1->Add( 1 );
    yData1->Add( 3 );
    yData1->Add( 2 );

    System::Collections::Generic::List<System::Collections::Generic::List<int> ^> ^ yData = gcnew System::Collections::Generic::List<System::Collections::Generic::List<int> ^>();
    yData->Add( yData1 );
    chart->YData = yData;

Although, in practice, it did not seem to be necessary to load any data to trigger the exception.

Thanks,
-Dave
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Numeric Axis Labels on LineChart
Reply #21 - Mar 18th, 2008 at 4:14pm
Print Post  
Thank you for the code - now we have reproduced the bug. This version should fix it:
https://mindfusion.eu/_temp/mc_fix.zip

Stoyan
  
Back to top
 
IP Logged
 
DaveDeakins
YaBB Newbies
*
Offline



Posts: 15
Joined: Mar 5th, 2008
Re: Numeric Axis Labels on LineChart
Reply #22 - Mar 24th, 2008 at 7:42pm
Print Post  
Hello Stoyan,

I just purchased a license of the MasterChart component for our project and I notice that the latest release does not yet include these new DateTime X axis features that you guys have been including.  When should I expect that these items would be released? 

I also purchased the Planner component and am using both components in the same application.  I am trying to use your updated MasterChart trial until a new release is available, but I am running into a conflict with the released Planner files.  Both use MindFusion.Common.dll, but your updated MasterChart trial relies on a newer version than what came with the released Planner component.  If I try to use the newer version, then Planner does not load correctly.  If I try to use the older version, MasterChart does not load correctly.  Do you have any recommendations on how I could work around this?

Thanks,
-Dave
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Numeric Axis Labels on LineChart
Reply #23 - Mar 24th, 2008 at 8:02pm
Print Post  
Hello Dave,

We are going to release the new version in a few days; I can send you a pre-release licensed build if you need it sooner. The updated Masterchart dlls that you have are for .NET 1.1, and the Common.dll there should be the same as the one under the Planner.NET\VS2003(.NET 1.1) folder. Try adding the Planner assemblies from there to your project, then you should be able to use both controls.

Thank you,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint