Hi,

Say i have to add styles that should not replace the existing styles, it should just append to the existing style. Say i have two arrays of cells, in which some will be repeating in both arrays.

For first array i use just color to use I use graph.setCellStyle(style,array1Cells);

For second array say i use shape I use graph.setCellStyle(style,array2Cells);

So wat happens is when coming to second array styling, the styles are getting replaced. How means cell1 is present in both array1 & array2, so both shape and color should be added to this cell, but its not doing... How to accomplish this?

Thanks in advance

asked 17 May '12, 09:29

hansie's gravatar image

hansie
51428
accept rate: 0%


Try mxGraph.setCellStyles

link

answered 18 May '12, 02:53

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Thanks Gaudenz for the reply, i need a single cell style to be changed not group of cells, because the both which i have tried above are for group of cells, how can i do change a single cell style by not storing in to array. Say like graph.setCellStyle(style,cell); I did not found this syntax anywhere, all are used for group of cells...

Thanks in advance

(18 May '12, 03:43) hansie

With the help of your suggestion itself, i got the solution some how by creating unique cell id array to push in it and hence get the cell styles for each. Thanks

link

answered 18 May '12, 04:00

hansie's gravatar image

hansie
51428
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×79
×50
×10

Asked: 17 May '12, 09:29

Seen: 2,055 times

Last updated: 18 May '12, 04:00