Ask palete and diagram image

hi,guys…
sorry for disturbing you…

i’m new here… i want to ask how can i make image from palette diagrams???

i’m using palette diagram to drawing… after drawing is finished… i want to convert to image such as png or jpeg… but i can’t combine the two examples into one…

example one: http://gojs.net/latest/intro/palette.html (palette)
example two: http://gojs.net/latest/intro/makingImages.html (make images)

i’ve tried to combine two example, but can’t make it…anyone can give me clue???what’s wrong???

it’s solved…sorry