Jump to content
Software FX Community

X Label size


User (Legacy)

Recommended Posts

Hi, 

- I can't extend the X labels from 9 characters to for instance 16?

void CMyView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) {

CTrendData* pTD = GetDocument()->TrendDataObjectArray[0]; // My container!

m_pChartFX->OpenDataEx((CfxCod) COD_VALUES, 1, COD_UNKNOWN);

m_pChartFX->OpenDataEx((CfxCod) COD_XVALUES, 1, COD_UNKNOWN);

for (int i=0; i < pTD->m_nNoOfValues; i++)

// Values between 0 and 100

m_pChartFX->ValueEx[0][i] = pTD->m_TrendlogValues.GetAt(i);

// Consecutive date&time values in seconds,

// e.g. 934546238, 934546248, 934546258, 934546268...

m_pChartFX->XValueEx[0][i] = pTD->m_TrendlogDateTimes.GetAt(i);

}

m_pChartFX->CloseData(COD_XVALUES);

m_pChartFX->CloseData(COD_VALUES);

ICfxAxisPtr pAxis = m_pChartFX->Axis->Item[AXIS_X];

pAxis->Min = pTD->m_TrendlogDateTimes.GetAt(0);

// pAxis->STEP = 25;

pAxis->Style = (CfxAxisStyle) (pAxis->Style | AS_NOTIFY);

}

// This method is called when any of the axis labels is about to be painted.

void CAxds5View::EvGetAxisLabel(int nAxis)

{

m_pChartFX->HText = "ABCDEFGHIJ123456";

}

- The label result is "ABCDEFGHI" instead of "ABCDEFGHIJ123456" ?

Regards,

Lars Birger

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...