Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. what's wrong here?

what's wrong here?

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresdatabasevisual-studioquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kash
    wrote on last edited by
    #1

    Hi, I'm trying to plot a non linear graph using MSChart. I set up the array and val stores the result of the calculation. However, the graph I plot appears linear and it's plotted val vs val whereas I want index[0] vs val? double val=0; double step=0.5; DWORD numElements[] = {10, 2} saRet.Create(VT_VARIANT, 2, numElements); long index[2]; for(index[0]=0; index[0]<10; index[0]++) { for(index[1]=0; index[1]<2; index[1]++) { val = index[0]*index[0]; saRet.PutElement(index, COleVariant( val )); val += step; } } m_chart.SetChartData(saRet.Detach()); m_chart.Refresh(); } Any ideas? Cheers

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups