Saturday, February 24th 2018, 2:41am UTC+1

You are not logged in.

  • Login
  • Register

mahdi

Beginner

Date of registration: Jan 28th 2018

Posts: 7

1

Monday, January 29th 2018, 2:29pm

GRAPH SetPenSize Problem

hello

I created a GRAPH with GUIBuilder and use it.
GRAPH work fine and show attach Data.
but when i use GRAPH_DATA_XY_SetPenSize() to change pen size the size off pen not change.


WM_HWIN MainTask(void) {
WM_HWIN hWin;
WM_HWIN hItem;
GRAPH_DATA_Handle hData1;

hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);

hGraph = WM_GetDialogItem(hWin, ID_GRAPH_0);

hData1 = GRAPH_DATA_YT_Create(GUI_BLUE, 500, 0, 0);
GRAPH_DATA_YT_SetAlign(hData1, GRAPH_ALIGN_LEFT);
GRAPH_DATA_XY_SetLineStyle( hData1, GUI_LS_SOLID);
GRAPH_DATA_XY_SetPenSize(hData1, 5);
GRAPH_AttachData(hGraph, hData1);

This post has been edited 6 times, last edit by "mahdi" (Jan 29th 2018, 2:38pm)


SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 496

2

Monday, February 5th 2018, 2:01pm

Hi,

The function GRAPH_XY_SetPenSize() is only for setting the pensize of a XY-graph. You have created a YT-graph and can't use the XY related functions.
Unfortunately, there is no way to adapt the pensize for a YT-graph.

In this case you could try to set a user draw function with GRAPH_SetUserDraw() or create your own graph with function the GUI_DrawGraph().

Regards
Sven

mahdi

Beginner

Date of registration: Jan 28th 2018

Posts: 7

3

Monday, February 5th 2018, 9:45pm

I did not pay attention to this 8o

Thanks

Similar threads