ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Thank you very so much.
Posted by anna on Mar-21-2014 20:25
Hello~

This has been solved.

Thank you very so much.

  Re: Thank you very so much.
Posted by anna on Mar-21-2014 20:42


Your teaching....




1) ParamDlg.h

public:
double *xProjData ;
double *yProjData ;
long lLength;


2)
void CParamDlg::UpdateHisto()
{
      xProjData = new double[Length];
      yProjData = new double[Length];

      lLength = Length;

      for (long index = 0; index < Length; index ++)
     {
          xProjData[index] = index + 1;
          yProjData[index] = (double)pProjection[index];
     }

     drawChart(&m_ChartViewer);
}

3)
void CParamChipCheckerDlg::drawChart(CChartViewer *viewer)
{
    XYChart *c = new XYChart(392, 100);

    c->setPlotArea(35, 30 , c->getWidth()-50, c->getHeight()-50, c->linearGradientColor(35, 30, 0,  c->getHeight()-50, 0xf0f6ff, 0xa0c0ff), -1, Chart::Transparent, 0xffffff, 0xffffff);


    c->xAxis()->setLabelStyle("arialbd.ttf", 8);
    c->yAxis()->setLabelStyle("arialbd.ttf", 8);

    c->xAxis()->setColors(Chart::Transparent);
    c->yAxis()->setColors(Chart::Transparent);

    //===> Draw Chart.
    LineLayer *layer = c->addLineLayer();
    layer->setLineWidth(2);
    layer->setXData(DoubleArray(xProjData, lLength));
    layer->addDataSet(DoubleArray(yProjData, lLength ), 0xcc0000, "Power");
    viewer->setChart(c);
   //<=== Draw Chart.
}


In code,
    layer->setXData(DoubleArray(xProjData, lLength));
    layer->addDataSet(DoubleArray(yProjData, lLength ), 0xcc0000, "Power");

  Re: Thank you very so much.
Posted by anna on Mar-25-2014 23:36
In Here code
In X-axis value  Y-axis value setting title post
In here  code , add example code   please