Jump to content
Software FX Community

Re: Trouble Using the Series Object


User (Legacy)

Recommended Posts

Thanks.  These two lines of code saved the day. 

I am having another wierd problem using the series object. It seems to me

that if I modify a property of a series in code that I can no longer modify

it using the properties dialog from the toolbar. For example this is what I

am doing in code.

ICfxSeriesEnumPtr newSeriesEnumPtr = m_spChartFX->GetSeries();

// Get a reference to the series object for this trace

ICfxSeriesPtr seriesPtr = newSeriesEnumPtr->GetItem(i);

// TEST RANDOM DATA

m_traceVariables[i]->m_value = rand() % 100;

// Add the new data point for the series

seriesPtr->PutYvalue(0, m_traceVariables[i]->m_value);

// Set visual properties of the series.

seriesPtr->put_Color(m_traceVariables[i]->m_colour);

seriesPtr->put_LineStyle(m_traceVariables[i]->m_lineStyle);

seriesPtr->put_MarkerShape(m_traceVariables[i]->m_markerShape);

seriesPtr->put_Visible(m_traceVariables[i]->m_visible);

seriesPtr->put_LineWidth(m_traceVariables[i]->m_lineWidth);

seriesPtr->put_MarkerSize(m_traceVariables[i]->m_markerSize);

seriesPtr->put_MarkerStep(m_traceVariables[i]->m_markerStep);

seriesPtr->put_PointLabels(m_traceVariables[i]->m_showPointLabels);

Each of these properties that I have modifed using the put_ method I can no

longer modify using the properties dialog. To make this problem a bit more

"colourful", the only property that I can modify programmatically without

effecting the properties dialog is the Color property.

Is there also a special way to call OpenDataEx when I only want to modify

these properties. I have tried using COD_ADDPOINTS and COD_COLORS.

Is it correct to read the property of the series object using the get_

method and modify it using the put_ method OR is there another way?

Thanks

Frank Cammaroto

Francisco Padron wrote in message ...

>You can not add series using COD_ADDPOINTS. To add a series:

>

>m_spChartFX->OpenDataEx(COD_VALUES, nOldSeries+1,COD_UNCHANGE);

>m_spChartFX->CloseData(COD_VALUES);

>

>Frank

>SFX

>

>

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...